summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-08-17 03:27:49 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-08-17 03:27:49 (GMT)
commit0940b13ba7eb7420588b968eb392825e88981308 (patch)
tree448d6ce7bd977a602b4fe98658608281b03ee7ba /tests/auto
parent6e39638936503b6898769ffe3ab0d5e7e6718b23 (diff)
parentb98e9e69dd8ba33d5f01b9518d95b63b86c4b443 (diff)
downloadQt-0940b13ba7eb7420588b968eb392825e88981308.zip
Qt-0940b13ba7eb7420588b968eb392825e88981308.tar.gz
Qt-0940b13ba7eb7420588b968eb392825e88981308.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: Fix delayed password masking mid-string.
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qlineedit/tst_qlineedit.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/qlineedit/tst_qlineedit.cpp b/tests/auto/qlineedit/tst_qlineedit.cpp
index 1f33458..3276375 100644
--- a/tests/auto/qlineedit/tst_qlineedit.cpp
+++ b/tests/auto/qlineedit/tst_qlineedit.cpp
@@ -1764,6 +1764,13 @@ void tst_QLineEdit::passwordEchoDelay()
QApplication::sendEvent(testWidget, &ev);
QCOMPARE(testWidget->displayText(), QString(7, fillChar) + QLatin1Char('7'));
+ testWidget->setCursorPosition(3);
+ QCOMPARE(testWidget->displayText(), QString(7, fillChar) + QLatin1Char('7'));
+ QTest::keyPress(testWidget, 'a');
+ QCOMPARE(testWidget->displayText(), QString(3, fillChar) + QLatin1Char('a') + QString(5, fillChar));
+ QTest::keyPress(testWidget, Qt::Key_Backspace);
+ QCOMPARE(testWidget->displayText(), QString(8, fillChar));
+
// restore clean state
testWidget->setEchoMode(QLineEdit::Normal);
}