diff options
author | Joona Petrell <joona.t.petrell@nokia.com> | 2011-09-28 17:47:19 +0300 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-29 08:31:26 +0200 |
commit | dc2935cbb0852c23804d894bef0e2a56b343b089 (patch) | |
tree | dadc4e59f439ab56b1a636d32f74b443c455a8c1 /tests/auto/declarative/qsgtextedit | |
parent | 65f07f3b95408b0a85590571118dd59a4171a9a2 (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/qsgtextedit')
-rw-r--r-- | tests/auto/declarative/qsgtextedit/tst_qsgtextedit.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/declarative/qsgtextedit/tst_qsgtextedit.cpp b/tests/auto/declarative/qsgtextedit/tst_qsgtextedit.cpp index 3e92c35555..ffb8188444 100644 --- a/tests/auto/declarative/qsgtextedit/tst_qsgtextedit.cpp +++ b/tests/auto/declarative/qsgtextedit/tst_qsgtextedit.cpp @@ -2404,21 +2404,21 @@ void tst_qsgtextedit::inputMethodComposing() { QInputMethodEvent event(text.mid(3), QList<QInputMethodEvent::Attribute>()); - QGuiApplication::sendEvent(&view, &event); + QGuiApplication::sendEvent(edit, &event); } - QEXPECT_FAIL("", "QTBUG-21690", Abort); + QCOMPARE(edit->isInputMethodComposing(), true); QCOMPARE(spy.count(), 1); { QInputMethodEvent event(text.mid(12), QList<QInputMethodEvent::Attribute>()); - QGuiApplication::sendEvent(&view, &event); + QGuiApplication::sendEvent(edit, &event); } QCOMPARE(spy.count(), 1); { QInputMethodEvent event; - QGuiApplication::sendEvent(&view, &event); + QGuiApplication::sendEvent(edit, &event); } QCOMPARE(edit->isInputMethodComposing(), false); QCOMPARE(spy.count(), 2); |