diff options
author | Pekka Vuorela <pekka.ta.vuorela@nokia.com> | 2012-02-29 18:43:50 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-26 10:36:31 +0200 |
commit | f32ae39ac4b634bd82adc7e5a756f801e70e879a (patch) | |
tree | c333558e2f6f80df44c3515a6dfac99e1e16e81c /tests/auto/quick/qquicktextinput | |
parent | 2532c475d16b7b2252f44ab1fe858d17262d7fc1 (diff) |
Remove tentative commit from editors
Feature to be reimplemented simplified. Now using new
FocusAboutToChange event for using input method to commit stuff when
window is losing focus.
Change-Id: I81c96c36d9f0a1b38adb4324f3b892c33547cb50
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
Diffstat (limited to 'tests/auto/quick/qquicktextinput')
-rw-r--r-- | tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp index afe102aa4c..1c8bff9d69 100644 --- a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp +++ b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp @@ -2022,28 +2022,6 @@ void tst_qquicktextinput::inputMethods() QCOMPARE(input->text(), QString("Our Goodbye world!")); QCOMPARE(input->cursorPosition(), 7); - // test that basic tentative commit gets to text property on preedit state - input->setText(""); - QList<QInputMethodEvent::Attribute> attributes; - QInputMethodEvent preeditEvent("test", attributes); - preeditEvent.setTentativeCommitString("test"); - QGuiApplication::sendEvent(input, &preeditEvent); - QCOMPARE(input->text(), QString("test")); - - // tentative commit not allowed present in surrounding text - QInputMethodQueryEvent queryEvent(Qt::ImSurroundingText); - QGuiApplication::sendEvent(input, &queryEvent); - QCOMPARE(queryEvent.value(Qt::ImSurroundingText).toString(), QString("")); - - // if text with tentative commit does not validate, not allowed to be part of text property - input->setText(""); // ensure input state is reset - QValidator *validator = new QIntValidator(0, 100); - input->setValidator(validator); - QGuiApplication::sendEvent(input, &preeditEvent); - QCOMPARE(input->text(), QString("")); - input->setValidator(0); - delete validator; - // input should reset selection even if replacement parameters are out of bounds input->setText("text"); input->setCursorPosition(0); |