diff options
author | Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> | 2012-04-18 12:16:21 -0700 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-20 02:26:23 +0200 |
commit | 22408c96cdf4597c410fcde1d01df9f8c53fd8c8 (patch) | |
tree | 8080e5dad164ae4c54d851d3ed3c83db52f3bd25 /tests/auto/quick/qquicktextinput | |
parent | 360f0d00088cc84791e7a197b20a325bfdac9eb3 (diff) |
Use QInputMethod::isVisible instead of QInputMethod::visible
QInputMethod::visible will be removed in qtbase.
Change-Id: I16ffbe56d55a62ae6a905e3cfdab8ad245d24aa0
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
Diffstat (limited to 'tests/auto/quick/qquicktextinput')
-rw-r--r-- | tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp index 925e4f9b0d..ab664ae6fa 100644 --- a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp +++ b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp @@ -2993,7 +2993,7 @@ void tst_qquicktextinput::openInputPanel() QVERIFY(input->focusOnPress()); QVERIFY(!input->hasActiveFocus()); QVERIFY(qApp->focusObject() != input); - QCOMPARE(qApp->inputMethod()->visible(), false); + QCOMPARE(qApp->inputMethod()->isVisible(), false); // input panel should open on focus QPoint centerPoint(view.width()/2, view.height()/2); @@ -3002,16 +3002,16 @@ void tst_qquicktextinput::openInputPanel() QGuiApplication::processEvents(); QVERIFY(input->hasActiveFocus()); QCOMPARE(qApp->focusObject(), input); - QCOMPARE(qApp->inputMethod()->visible(), true); + QCOMPARE(qApp->inputMethod()->isVisible(), true); QTest::mouseRelease(&view, Qt::LeftButton, noModifiers, centerPoint); // input panel should be re-opened when pressing already focused TextInput qApp->inputMethod()->hide(); - QCOMPARE(qApp->inputMethod()->visible(), false); + QCOMPARE(qApp->inputMethod()->isVisible(), false); QVERIFY(input->hasActiveFocus()); QTest::mousePress(&view, Qt::LeftButton, noModifiers, centerPoint); QGuiApplication::processEvents(); - QCOMPARE(qApp->inputMethod()->visible(), true); + QCOMPARE(qApp->inputMethod()->isVisible(), true); QTest::mouseRelease(&view, Qt::LeftButton, noModifiers, centerPoint); // input panel should stay visible if focus is lost to another text inputor @@ -3020,7 +3020,7 @@ void tst_qquicktextinput::openInputPanel() anotherInput.componentComplete(); anotherInput.setParentItem(view.rootObject()); anotherInput.setFocus(true); - QCOMPARE(qApp->inputMethod()->visible(), true); + QCOMPARE(qApp->inputMethod()->isVisible(), true); QCOMPARE(qApp->focusObject(), qobject_cast<QObject*>(&anotherInput)); QCOMPARE(inputPanelVisibilitySpy.count(), 0); @@ -3034,28 +3034,28 @@ void tst_qquicktextinput::openInputPanel() // input panel should not be opened if TextInput is read only input->setReadOnly(true); input->setFocus(true); - QCOMPARE(qApp->inputMethod()->visible(), false); + QCOMPARE(qApp->inputMethod()->isVisible(), false); QTest::mousePress(&view, Qt::LeftButton, noModifiers, centerPoint); QTest::mouseRelease(&view, Qt::LeftButton, noModifiers, centerPoint); QGuiApplication::processEvents(); - QCOMPARE(qApp->inputMethod()->visible(), false); + QCOMPARE(qApp->inputMethod()->isVisible(), false); // input panel should not be opened if focusOnPress is set to false input->setFocusOnPress(false); input->setFocus(false); input->setFocus(true); - QCOMPARE(qApp->inputMethod()->visible(), false); + QCOMPARE(qApp->inputMethod()->isVisible(), false); QTest::mousePress(&view, Qt::LeftButton, noModifiers, centerPoint); QTest::mouseRelease(&view, Qt::LeftButton, noModifiers, centerPoint); - QCOMPARE(qApp->inputMethod()->visible(), false); + QCOMPARE(qApp->inputMethod()->isVisible(), false); // input panel should open when openSoftwareInputPanel is called input->openSoftwareInputPanel(); - QCOMPARE(qApp->inputMethod()->visible(), true); + QCOMPARE(qApp->inputMethod()->isVisible(), true); // input panel should close when closeSoftwareInputPanel is called input->closeSoftwareInputPanel(); - QCOMPARE(qApp->inputMethod()->visible(), false); + QCOMPARE(qApp->inputMethod()->isVisible(), false); } class MyTextInput : public QQuickTextInput |