diff options
author | Joona Petrell <joona.t.petrell@nokia.com> | 2011-03-08 04:33:29 (GMT) |
---|---|---|
committer | Joona Petrell <joona.t.petrell@nokia.com> | 2011-03-08 06:58:11 (GMT) |
commit | 54de06c6f3bd7ef74a10bfab9bff5416078edd6f (patch) | |
tree | 80e49e446f417138bae41750a0b179b4a0e5299c /tests/auto/declarative/qdeclarativetext | |
parent | c783cbfe3839d7a4c0f75613d2a94e8cfb7a29d1 (diff) | |
download | Qt-54de06c6f3bd7ef74a10bfab9bff5416078edd6f.zip Qt-54de06c6f3bd7ef74a10bfab9bff5416078edd6f.tar.gz Qt-54de06c6f3bd7ef74a10bfab9bff5416078edd6f.tar.bz2 |
Base empty QML editor horizontal alignment on QApplication::keyboardInputDirection()
Task-number: QTBUG-15880
Reviewed-by: Martin Jones
Change-Id: I240d53c8572fd3d1222b555e93812a3ee38e2558
Diffstat (limited to 'tests/auto/declarative/qdeclarativetext')
-rw-r--r-- | tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp index 261dc51..c854f86 100644 --- a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp +++ b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp @@ -576,9 +576,11 @@ void tst_qdeclarativetext::horizontalAlignment_RightToLeft() QCOMPARE(text->hAlign(), QDeclarativeText::AlignLeft); QVERIFY(textPrivate->layout.lineAt(0).naturalTextRect().left() < canvas->width()/2); - // empty text is also implicitly left aligned + // empty text with implicit alignment follows the system locale-based + // keyboard input direction from QApplication::keyboardInputDirection text->setText(""); - QCOMPARE(text->hAlign(), QDeclarativeText::AlignLeft); + QCOMPARE(text->hAlign(), QApplication::keyboardInputDirection() == Qt::LeftToRight ? + QDeclarativeText::AlignLeft : QDeclarativeText::AlignRight); text->setHAlign(QDeclarativeText::AlignRight); QCOMPARE(text->hAlign(), QDeclarativeText::AlignRight); |