diff options
author | David Boddie <dboddie@trolltech.com> | 2010-08-24 14:03:37 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2010-08-24 14:03:37 (GMT) |
commit | a8030e0c543e538652605557843b845f89b11589 (patch) | |
tree | 60ee6e2ed6e005a7cefd3ff5ba0bf1bbfb6930ac /tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp | |
parent | ff6f17c92ad1bfa898bc89a5ccb65361d443c591 (diff) | |
parent | f3771c5d91995b2beaa73bd3e3c783b76a887b50 (diff) | |
download | Qt-a8030e0c543e538652605557843b845f89b11589.zip Qt-a8030e0c543e538652605557843b845f89b11589.tar.gz Qt-a8030e0c543e538652605557843b845f89b11589.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7
Diffstat (limited to 'tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp')
-rw-r--r-- | tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp | 16 |
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"); |