aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicktextinput
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-12-04 01:00:40 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-12-04 01:00:41 +0100
commitaf9a96ca10e72517a7e8aa1ada7ec2d635e2a9ff (patch)
tree4b36daf460954c7c81f46acedae5409f3ac6a0a2 /tests/auto/quick/qquicktextinput
parent8c0fb7679c34281b7ed48e466a7eb72885c088e7 (diff)
parent705e80b702d752633828be9ac9467090e6541c66 (diff)
Merge remote-tracking branch 'origin/5.14' into 5.15
Diffstat (limited to 'tests/auto/quick/qquicktextinput')
-rw-r--r--tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
index 1d12121a6f..e1da7e5795 100644
--- a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
+++ b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
@@ -6428,6 +6428,14 @@ void tst_qquicktextinput::setInputMask()
QQuickTextInput *textInput = qobject_cast<QQuickTextInput*>(textInputComponent.create());
QVERIFY(textInput != nullptr);
+ // [QTBUG-80190] check if setting the same property value again doesn't emit an
+ // inputMaskChanged signal
+ QString unescapedMask = mask; // mask is escaped, because '\' is also escape in a JS string
+ unescapedMask.replace(QLatin1String("\\\\"), QLatin1String("\\")); // simple unescape
+ QSignalSpy spy(textInput, SIGNAL(inputMaskChanged(const QString &)));
+ textInput->setInputMask(unescapedMask);
+ QCOMPARE(spy.count(), 0);
+
// then either insert using insert() or keyboard
if (insert_text) {
textInput->insert(0, input);