diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2011-04-21 11:12:18 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2011-04-21 11:12:18 (GMT) |
commit | 1b95c4e6502ede5a980aaf5a2ed9dad283b3eadd (patch) | |
tree | 066bdf995360981ebb645383b93866133c1ca000 /tests/auto/declarative/qdeclarativetextinput | |
parent | a334ad303d2763cd53fc5bd62945d08d3555b8a7 (diff) | |
parent | 43bce78bd5a41115ab5a541243cc3edcecd2904e (diff) | |
download | Qt-1b95c4e6502ede5a980aaf5a2ed9dad283b3eadd.zip Qt-1b95c4e6502ede5a980aaf5a2ed9dad283b3eadd.tar.gz Qt-1b95c4e6502ede5a980aaf5a2ed9dad283b3eadd.tar.bz2 |
Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7
Conflicts:
src/plugins/qmltooling/qmldbg_ost/qostdevice.h
Diffstat (limited to 'tests/auto/declarative/qdeclarativetextinput')
-rw-r--r-- | tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp index ef32ee3..943b1fa 100644 --- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp +++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp @@ -2285,6 +2285,20 @@ void tst_qdeclarativetextinput::preeditAutoScroll() ic.sendPreeditText(preeditText.mid(0, 3), 1); QCOMPARE(input.positionAt(0), 0); QCOMPARE(input.positionAt(input.width()), 5); + + ic.sendEvent(QInputMethodEvent()); + input.setAutoScroll(true); + // Test committing pre-edit text at the start of the string. QTBUG-18789 + input.setCursorPosition(0); + ic.sendPreeditText(input.text(), 5); + QCOMPARE(input.positionAt(0), 0); + + QInputMethodEvent event; + event.setCommitString(input.text()); + ic.sendEvent(event); + + QCOMPARE(input.positionAt(0), 0); + QCOMPARE(input.positionAt(input.width()), 5); } void tst_qdeclarativetextinput::preeditMicroFocus() |