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.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
index b3e16c49c7..155223d9a7 100644
--- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
+++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
@@ -762,6 +762,7 @@ void tst_qdeclarativetextinput::sendRequestSoftwareInputPanelEvent()
// focus on press, input panel on focus
QTest::mousePress(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(input.scenePos()));
QApplication::processEvents();
+ QVERIFY(input.hasFocus());
QCOMPARE(ic.openInputPanelReceived, true);
QCOMPARE(ic.closeInputPanelReceived, false);
ic.openInputPanelReceived = false;
@@ -772,6 +773,14 @@ void tst_qdeclarativetextinput::sendRequestSoftwareInputPanelEvent()
QCOMPARE(ic.closeInputPanelReceived, false);
ic.openInputPanelReceived = false;
+ // Even with focus already gained, user needs
+ // to be able to open panel by pressing on the editor
+ QTest::mousePress(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(input.scenePos()));
+ QApplication::processEvents();
+ QCOMPARE(ic.openInputPanelReceived, true);
+ QCOMPARE(ic.closeInputPanelReceived, false);
+ ic.openInputPanelReceived = false;
+
// input panel closed on focus lost
input.setFocus(false);
QApplication::processEvents();