diff options
author | Joona Petrell <joona.t.petrell@nokia.com> | 2010-05-12 08:20:18 (GMT) |
---|---|---|
committer | Joona Petrell <joona.t.petrell@nokia.com> | 2010-05-13 00:21:51 (GMT) |
commit | d45c45432ccd0a74c67e70ce5fc3a09f35923c26 (patch) | |
tree | a10c42eb95a036ab66d26fae5a4f83261c5aef46 /tests/auto/declarative/qdeclarativetextinput | |
parent | f17c706db16aae93f024e88208e139063f5b2c7c (diff) | |
download | Qt-d45c45432ccd0a74c67e70ce5fc3a09f35923c26.zip Qt-d45c45432ccd0a74c67e70ce5fc3a09f35923c26.tar.gz Qt-d45c45432ccd0a74c67e70ce5fc3a09f35923c26.tar.bz2 |
Fix TextEdit and TextInput input panel support for mode RSIP_OnMouseClickAndAlreadyFocused
Task-number:
Reviewed-by: Warwick Allison
Diffstat (limited to 'tests/auto/declarative/qdeclarativetextinput')
-rw-r--r-- | tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp index c00390d..ac80edb 100644 --- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp +++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp @@ -743,8 +743,6 @@ void tst_qdeclarativetextinput::sendRequestSoftwareInputPanelEvent() view.viewport()->setInputContext(&ic); QStyle::RequestSoftwareInputPanel behavior = QStyle::RequestSoftwareInputPanel( view.style()->styleHint(QStyle::SH_RequestSoftwareInputPanel)); - if ((behavior != QStyle::RSIP_OnMouseClick)) - QSKIP("This test need to have a style with RSIP_OnMouseClick", SkipSingle); QDeclarativeTextInput input; input.setText("Hello world"); input.setPos(0, 0); @@ -756,7 +754,14 @@ void tst_qdeclarativetextinput::sendRequestSoftwareInputPanelEvent() QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(&view)); QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(input.scenePos())); QApplication::processEvents(); - QCOMPARE(ic.softwareInputPanelEventReceived, true); + if (behavior == QStyle::RSIP_OnMouseClickAndAlreadyFocused) { + QCOMPARE(ic.softwareInputPanelEventReceived, false); + QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(input.scenePos())); + QApplication::processEvents(); + QCOMPARE(ic.softwareInputPanelEventReceived, true); + } else if (behavior == QStyle::RSIP_OnMouseClick) { + QCOMPARE(ic.softwareInputPanelEventReceived, true); + } } class MyTextInput : public QDeclarativeTextInput |