aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qsgtextinput
diff options
context:
space:
mode:
authorJoona Petrell <joona.t.petrell@nokia.com>2011-09-28 17:47:19 +0300
committerQt by Nokia <qt-info@nokia.com>2011-09-29 08:31:26 +0200
commitdc2935cbb0852c23804d894bef0e2a56b343b089 (patch)
treedadc4e59f439ab56b1a636d32f74b443c455a8c1 /tests/auto/declarative/qsgtextinput
parent65f07f3b95408b0a85590571118dd59a4171a9a2 (diff)
Fix TextInput and TextEdit inputMethodComposing autotests
In old QInputContext architecture events were send to focus widget, which delivered the events to the text editor items. In Qt5, input methods send events directly to the editor object using QInputPanel::inputItem(). Task-number: QTBUG-21691 Change-Id: Ia219f0cc7caaeafc32f5d7674a6ab377e773d4fa Reviewed-on: http://codereview.qt-project.org/5741 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'tests/auto/declarative/qsgtextinput')
-rw-r--r--tests/auto/declarative/qsgtextinput/tst_qsgtextinput.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/auto/declarative/qsgtextinput/tst_qsgtextinput.cpp b/tests/auto/declarative/qsgtextinput/tst_qsgtextinput.cpp
index 5f9771a289..35e0e91f83 100644
--- a/tests/auto/declarative/qsgtextinput/tst_qsgtextinput.cpp
+++ b/tests/auto/declarative/qsgtextinput/tst_qsgtextinput.cpp
@@ -2562,21 +2562,20 @@ void tst_qsgtextinput::inputMethodComposing()
QCOMPARE(input->isInputMethodComposing(), false);
{
QInputMethodEvent event(text.mid(3), QList<QInputMethodEvent::Attribute>());
- QGuiApplication::sendEvent(&view, &event);
+ QGuiApplication::sendEvent(input, &event);
}
- QEXPECT_FAIL("", QTBUG_21691_MESSAGE, Abort);
QCOMPARE(input->isInputMethodComposing(), true);
QCOMPARE(spy.count(), 1);
{
QInputMethodEvent event(text.mid(12), QList<QInputMethodEvent::Attribute>());
- QGuiApplication::sendEvent(&view, &event);
+ QGuiApplication::sendEvent(input, &event);
}
QCOMPARE(spy.count(), 1);
{
QInputMethodEvent event;
- QGuiApplication::sendEvent(&view, &event);
+ QGuiApplication::sendEvent(input, &event);
}
QCOMPARE(input->isInputMethodComposing(), false);
QCOMPARE(spy.count(), 2);