aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
diff options
context:
space:
mode:
authorAndy Nichols <andy.nichols@theqtcompany.com>2016-04-05 12:09:51 +0200
committerAndy Nichols <andy.nichols@theqtcompany.com>2016-04-05 12:11:13 +0200
commit60da655dff4ffcc94d32a05bb5fa32240b0eaa0b (patch)
tree3f3f9d427570d505d8249053e9646af69a95e783 /tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
parent17d435fd8b2ed3a8ac6f93d17d0e78cd61bd7851 (diff)
parentfcbbedc3c21ff69d9251264dd708d6ca66c09359 (diff)
Merge remote-tracking branch 'origin/5.7' into dev
Diffstat (limited to 'tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp')
-rw-r--r--tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
index c899290594..e26bf6f4e4 100644
--- a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
+++ b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
@@ -222,6 +222,8 @@ private slots:
void ensureVisible();
void padding();
+ void QTBUG_51115_readOnlyResetsSelection();
+
private:
void simulateKey(QWindow *, int key);
@@ -6740,6 +6742,17 @@ void tst_qquicktextinput::padding()
delete root;
}
+void tst_qquicktextinput::QTBUG_51115_readOnlyResetsSelection()
+{
+ QQuickView view;
+ view.setSource(testFileUrl("qtbug51115.qml"));
+ view.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&view));
+ QQuickTextInput *obj = qobject_cast<QQuickTextInput*>(view.rootObject());
+
+ QCOMPARE(obj->selectedText(), QString());
+}
+
QTEST_MAIN(tst_qquicktextinput)
#include "tst_qquicktextinput.moc"