aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qtquick2/qquicktext
diff options
context:
space:
mode:
authorPekka Vuorela <pekka.ta.vuorela@nokia.com>2012-01-05 16:33:56 +0200
committerQt by Nokia <qt-info@nokia.com>2012-01-12 16:21:35 +0100
commit39f9b5def185337b2087cadeb3e137dfbeb85fa4 (patch)
treebb401cd8846ad29ecfe0b5f4c4bcfe12c101c3c0 /tests/auto/qtquick2/qquicktext
parentbe1534e5df82561842d1847f90f1cab9462e10ef (diff)
Adapt to QInputPanel::inputDirection() API
Information moved from QGuiApplication into QInputPanel. Change-Id: Idd80609f4b67bffae7222a1fa27918724ebf60f6 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Diffstat (limited to 'tests/auto/qtquick2/qquicktext')
-rw-r--r--tests/auto/qtquick2/qquicktext/tst_qquicktext.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/qtquick2/qquicktext/tst_qquicktext.cpp b/tests/auto/qtquick2/qquicktext/tst_qquicktext.cpp
index bb27505ffb..b76f764cce 100644
--- a/tests/auto/qtquick2/qquicktext/tst_qquicktext.cpp
+++ b/tests/auto/qtquick2/qquicktext/tst_qquicktext.cpp
@@ -712,9 +712,9 @@ void tst_qquicktext::horizontalAlignment_RightToLeft()
QVERIFY(textPrivate->layout.lineAt(0).naturalTextRect().left() < canvas->width()/2);
// empty text with implicit alignment follows the system locale-based
- // keyboard input direction from QApplication::keyboardInputDirection
+ // keyboard input direction from QInputPanel::inputDirection()
text->setText("");
- QCOMPARE(text->hAlign(), QApplication::keyboardInputDirection() == Qt::LeftToRight ?
+ QCOMPARE(text->hAlign(), qApp->inputPanel()->inputDirection() == Qt::LeftToRight ?
QQuickText::AlignLeft : QQuickText::AlignRight);
text->setHAlign(QQuickText::AlignRight);
QCOMPARE(text->hAlign(), QQuickText::AlignRight);
@@ -726,7 +726,7 @@ void tst_qquicktext::horizontalAlignment_RightToLeft()
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QQuickText *textObject = qobject_cast<QQuickText*>(textComponent.create());
- QCOMPARE(textObject->hAlign(), QApplication::keyboardInputDirection() == Qt::LeftToRight ?
+ QCOMPARE(textObject->hAlign(), qApp->inputPanel()->inputDirection() == Qt::LeftToRight ?
QQuickText::AlignLeft : QQuickText::AlignRight);
delete textObject;
}