aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
index 4ffbe9ccd5..8c72be56a4 100644
--- a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
+++ b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
@@ -3148,6 +3148,7 @@ void tst_qquicktextinput::echoMode()
QCOMPARE(initial, QLatin1String("ABCDefgh"));
QCOMPARE(input->echoMode(), QQuickTextInput::Normal);
QCOMPARE(input->displayText(), input->text());
+ const QString passwordMaskCharacter = qApp->styleHints()->passwordMaskCharacter();
//Normal
ref &= ~Qt::ImhHiddenText;
ref &= ~(Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText | Qt::ImhSensitiveData);
@@ -3155,7 +3156,7 @@ void tst_qquicktextinput::echoMode()
input->setEchoMode(QQuickTextInput::NoEcho);
QCOMPARE(input->text(), initial);
QCOMPARE(input->displayText(), QLatin1String(""));
- QCOMPARE(input->passwordCharacter(), QLatin1String("*"));
+ QCOMPARE(input->passwordCharacter(), passwordMaskCharacter);
//NoEcho
ref |= Qt::ImhHiddenText;
ref |= (Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText | Qt::ImhSensitiveData);
@@ -3165,7 +3166,7 @@ void tst_qquicktextinput::echoMode()
ref |= Qt::ImhHiddenText;
ref |= (Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText | Qt::ImhSensitiveData);
QCOMPARE(input->text(), initial);
- QCOMPARE(input->displayText(), QLatin1String("********"));
+ QCOMPARE(input->displayText(), QString(8, passwordMaskCharacter.at(0)));
QCOMPARE((Qt::InputMethodHints) input->inputMethodQuery(Qt::ImHints).toInt(), ref);
// clearing input hints do not clear bits set by echo mode
input->setInputMethodHints(Qt::ImhNone);
@@ -3220,7 +3221,7 @@ void tst_qquicktextinput::passwordEchoDelay()
QQuickItem *cursor = input->findChild<QQuickItem *>("cursor");
QVERIFY(cursor);
- QChar fillChar = QLatin1Char('*');
+ QChar fillChar = qApp->styleHints()->passwordMaskCharacter();
input->setEchoMode(QQuickTextInput::Password);
QCOMPARE(input->displayText(), QString(8, fillChar));