summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2011-02-16 07:08:10 (GMT)
committerAndrew den Exter <andrew.den-exter@nokia.com>2011-02-16 23:23:39 (GMT)
commitbfdecd0e2047fc49ed28ed095e657080897c91d1 (patch)
tree0c724407e9c2af4a44fe140208c6514403f7e8a7 /tests
parent35a36e91606eaf8374a2273cbb0101e0e614321e (diff)
downloadQt-bfdecd0e2047fc49ed28ed095e657080897c91d1.zip
Qt-bfdecd0e2047fc49ed28ed095e657080897c91d1.tar.gz
Qt-bfdecd0e2047fc49ed28ed095e657080897c91d1.tar.bz2
Fix TextInput, TextEdit auto test failure on windows and mac.
Micro focus is only updated on X11, QWS and Symbian platforms. Change-Id: Id02655cba79429e91022593ff0d1d6b8068c84ec Reviewed-by: Martin Jones
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp6
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp6
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
index 7226dc9..87c2c60 100644
--- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
+++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
@@ -1839,7 +1839,9 @@ void tst_qdeclarativetextedit::preeditMicroFocus()
ic.sendPreeditText(preeditText, 0);
currentRect = edit.inputMethodQuery(Qt::ImMicroFocus).toRect();
QCOMPARE(currentRect, previousRect);
+#if defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN)
QCOMPARE(ic.updateReceived, true);
+#endif
// Verify that the micro focus rect moves to the left as the cursor position
// is incremented.
@@ -1848,7 +1850,9 @@ void tst_qdeclarativetextedit::preeditMicroFocus()
ic.sendPreeditText(preeditText, i);
currentRect = edit.inputMethodQuery(Qt::ImMicroFocus).toRect();
QVERIFY(previousRect.left() < currentRect.left());
+#if defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN)
QCOMPARE(ic.updateReceived, true);
+#endif
previousRect = currentRect;
}
@@ -1859,7 +1863,9 @@ void tst_qdeclarativetextedit::preeditMicroFocus()
ic.sendEvent(QInputMethodEvent(preeditText, QList<QInputMethodEvent::Attribute>()));
currentRect = edit.inputMethodQuery(Qt::ImMicroFocus).toRect();
QCOMPARE(currentRect, previousRect);
+#if defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN)
QCOMPARE(ic.updateReceived, true);
+#endif
}
QTEST_MAIN(tst_qdeclarativetextedit)
diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
index 77cb323..7753f11 100644
--- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
+++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
@@ -1830,7 +1830,9 @@ void tst_qdeclarativetextinput::preeditMicroFocus()
ic.sendPreeditText(preeditText, 0);
currentRect = input.inputMethodQuery(Qt::ImMicroFocus).toRect();
QCOMPARE(currentRect, previousRect);
+#if defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN)
QCOMPARE(ic.updateReceived, true);
+#endif
// Verify that the micro focus rect moves to the left as the cursor position
// is incremented.
@@ -1839,7 +1841,9 @@ void tst_qdeclarativetextinput::preeditMicroFocus()
ic.sendPreeditText(preeditText, i);
currentRect = input.inputMethodQuery(Qt::ImMicroFocus).toRect();
QVERIFY(previousRect.left() < currentRect.left());
+#if defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN)
QCOMPARE(ic.updateReceived, true);
+#endif
previousRect = currentRect;
}
@@ -1850,7 +1854,9 @@ void tst_qdeclarativetextinput::preeditMicroFocus()
ic.sendEvent(QInputMethodEvent(preeditText, QList<QInputMethodEvent::Attribute>()));
currentRect = input.inputMethodQuery(Qt::ImMicroFocus).toRect();
QCOMPARE(currentRect, previousRect);
+#if defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN)
QCOMPARE(ic.updateReceived, true);
+#endif
}
QTEST_MAIN(tst_qdeclarativetextinput)