aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicktextinput
diff options
context:
space:
mode:
authorGirish Ramakrishnan <girish.1.ramakrishnan@nokia.com>2012-04-18 12:16:21 -0700
committerQt by Nokia <qt-info@nokia.com>2012-04-20 02:26:23 +0200
commit22408c96cdf4597c410fcde1d01df9f8c53fd8c8 (patch)
tree8080e5dad164ae4c54d851d3ed3c83db52f3bd25 /tests/auto/quick/qquicktextinput
parent360f0d00088cc84791e7a197b20a325bfdac9eb3 (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.cpp22
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