summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-08-18 00:40:59 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-08-18 00:40:59 (GMT)
commitb16c16134bac4dc7260fb74ca708a896886cddec (patch)
tree7caec242f2a79f19a592f365400a63a36fc85df4 /tests
parent9c1dc504c8f12858ab9c0b610bebb19019005eaa (diff)
parente0c798ebb4fc56fa6be38f6ec3e82de147891260 (diff)
downloadQt-b16c16134bac4dc7260fb74ca708a896886cddec.zip
Qt-b16c16134bac4dc7260fb74ca708a896886cddec.tar.gz
Qt-b16c16134bac4dc7260fb74ca708a896886cddec.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: Repaint TextInput when password character changes in password mode
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
index ca9009d..98a6012 100644
--- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
+++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
@@ -98,6 +98,7 @@ private slots:
void validators();
void inputMethods();
+ void passwordCharacter();
void cursorDelegate();
void navigation();
void copyAndPaste();
@@ -768,6 +769,21 @@ void tst_qdeclarativetextinput::copyAndPaste() {
#endif
}
+void tst_qdeclarativetextinput::passwordCharacter()
+{
+ QString componentStr = "import Qt 4.7\nTextInput { text: \"Hello world!\"; font.family: \"Helvetica\"; echoMode: TextInput.Password }";
+ QDeclarativeComponent textInputComponent(&engine);
+ textInputComponent.setData(componentStr.toLatin1(), QUrl());
+ QDeclarativeTextInput *textInput = qobject_cast<QDeclarativeTextInput*>(textInputComponent.create());
+ QVERIFY(textInput != 0);
+
+ textInput->setPasswordCharacter("X");
+ QSize contentsSize = textInput->contentsSize();
+ textInput->setPasswordCharacter(".");
+ // QTBUG-12383 content is updated and redrawn
+ QVERIFY(contentsSize != textInput->contentsSize());
+}
+
void tst_qdeclarativetextinput::cursorDelegate()
{
QDeclarativeView* view = createView(SRCDIR "/data/cursorTest.qml");