summaryrefslogtreecommitdiff
path: root/tests/auto/controls/data/tst_textfield.qml
diff options
context:
space:
mode:
authorDaiwei Li <daiweili@suitabletech.com>2015-01-30 20:24:31 -0800
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-02-02 10:05:38 +0000
commite7fc6186be4700565505ef890c53dbe3d22ba3f4 (patch)
treed237f90981cce9d18d43ea22b54d77fde1aa820e /tests/auto/controls/data/tst_textfield.qml
parent02d7f36ddfd444d715f82c1a780e99f6e0a7c14a (diff)
downloadqtquickcontrols-e7fc6186be4700565505ef890c53dbe3d22ba3f4.tar.gz
Allow override of passwordCharacter in TextFieldStyle
Task-number: QTBUG-41276 Change-Id: If384db2387d8e08459fd65c18fdc1541fdf4c084 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'tests/auto/controls/data/tst_textfield.qml')
-rw-r--r--tests/auto/controls/data/tst_textfield.qml16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_textfield.qml b/tests/auto/controls/data/tst_textfield.qml
index 168d9747..244daaf7 100644
--- a/tests/auto/controls/data/tst_textfield.qml
+++ b/tests/auto/controls/data/tst_textfield.qml
@@ -444,5 +444,21 @@ TestCase {
test.destroy()
}
+
+ function test_passwordCharacter() {
+ var textfield = Qt.createQmlObject('import QtQuick 2.2; \
+ import QtQuick.Controls 1.3; \
+ import QtQuick.Controls.Styles 1.1; \
+ TextField { \
+ style: TextFieldStyle { \
+ passwordCharacter: "+" \
+ } \
+ echoMode: TextInput.Password \
+ }', container, '')
+ textfield.forceActiveFocus()
+
+ textfield.text = "foo"
+ compare(textfield.displayText, "+++")
+ }
}
}