diff options
author | Pekka Vuorela <pekka.ta.vuorela@nokia.com> | 2010-11-26 20:11:32 +0200 |
---|---|---|
committer | Armin Berres <armin.berres@basyskom.de> | 2010-12-01 11:15:30 +0100 |
commit | 3152012204149bf53fe19148c1298cce7c5bb39b (patch) | |
tree | 1df129b44445765d376d4d329107c434ce0034d3 /tests | |
parent | 8d2e511baaad1b18e1f10117a31a73ae6177935f (diff) |
Changes: avoid unnecessary MTextEdit::textChanged() signal
RevBy: Ning Chi
Details: can be avoided if committed string is the same as previous
preedit since preedit already did the signal.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ut_mtextedit/ut_mtextedit.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/ut_mtextedit/ut_mtextedit.cpp b/tests/ut_mtextedit/ut_mtextedit.cpp index 44ae9957..0b756d0a 100644 --- a/tests/ut_mtextedit/ut_mtextedit.cpp +++ b/tests/ut_mtextedit/ut_mtextedit.cpp @@ -601,12 +601,15 @@ void Ut_MTextEdit::testInputMethodEvent() // Confirm that widget moved to pre-editing mode QVERIFY(m_subject->mode() == MTextEditModel::EditModeActive); + QInputMethodEvent preeditEvent(testString2, QList<QInputMethodEvent::Attribute>()); + m_subject->inputMethodEvent(&preeditEvent); + QInputMethodEvent commitEvent; commitEvent.setCommitString(testString2); m_subject->inputMethodEvent(&commitEvent); QCOMPARE(m_subject->text(), testString2); - QCOMPARE(spy.count(), 1); + QCOMPARE(spy.count(), 1); // optimization with preedit == commit spy.clear(); } |