summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp')
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
index 72e8b11..666bbc8 100644
--- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
+++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
@@ -1078,17 +1078,13 @@ void tst_qdeclarativetextinput::horizontalAlignment_RightToLeft()
QCOMPARE(textInput->hAlign(), QDeclarativeTextInput::AlignLeft);
QVERIFY(-textInputPrivate->hscroll < canvas->width()/2);
- // empty text should implicitly follow the layout direction
- QApplication::setLayoutDirection(Qt::RightToLeft);
+ // empty text is also implicitly left aligned
textInput->setText("");
- QCOMPARE(textInput->hAlign(), QDeclarativeTextInput::AlignRight);
- QVERIFY(-textInputPrivate->hscroll > canvas->width()/2);
- textInput->setHAlign(QDeclarativeTextInput::AlignLeft);
QCOMPARE(textInput->hAlign(), QDeclarativeTextInput::AlignLeft);
QVERIFY(-textInputPrivate->hscroll < canvas->width()/2);
-
- // set layout direction back to LTR to avoid affecting other autotests
- QApplication::setLayoutDirection(Qt::LeftToRight);
+ textInput->setHAlign(QDeclarativeTextInput::AlignRight);
+ QCOMPARE(textInput->hAlign(), QDeclarativeTextInput::AlignRight);
+ QVERIFY(-textInputPrivate->hscroll > canvas->width()/2);
delete canvas;
}