aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlcachegen
diff options
context:
space:
mode:
authorLeander Beernaert <leander.beernaert@qt.io>2019-11-18 16:15:01 +0100
committerLeander Beernaert <leander.beernaert@qt.io>2019-11-25 15:34:40 +0100
commitf1f395b37da163bce2dc3b5fc4e298bb4f56a3e7 (patch)
tree9ce2ba89a86ed754a8ecb8f52181770853e21a08 /tests/auto/qml/qmlcachegen
parentba494aaa24defe1401f621b791891e696b308756 (diff)
parent0ee087f5a5edd7d1aa39fd15e0dc85985320c09a (diff)
Merge remote-tracking branch 'origin/dev' into wip/cmake
Diffstat (limited to 'tests/auto/qml/qmlcachegen')
-rw-r--r--tests/auto/qml/qmlcachegen/data/parameterAdjustment.qml7
-rw-r--r--tests/auto/qml/qmlcachegen/qmlcachegen.pro3
-rw-r--r--tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp10
3 files changed, 19 insertions, 1 deletions
diff --git a/tests/auto/qml/qmlcachegen/data/parameterAdjustment.qml b/tests/auto/qml/qmlcachegen/data/parameterAdjustment.qml
new file mode 100644
index 0000000000..2128a54d81
--- /dev/null
+++ b/tests/auto/qml/qmlcachegen/data/parameterAdjustment.qml
@@ -0,0 +1,7 @@
+import QtQml 2.12
+
+QtObject {
+ signal testSignal(string a, int b, string c, bool d, bool e, real f, real g, bool h, int i, int j, string k, int l, string m, string n)
+ onTestSignal: {}
+ Component.onCompleted: testSignal("a", 1, "b", true, true, 0.1, 0.1, true, 1, 1, "a", 1, "a", "a")
+}
diff --git a/tests/auto/qml/qmlcachegen/qmlcachegen.pro b/tests/auto/qml/qmlcachegen/qmlcachegen.pro
index 1a334b68ce..452bd7d04a 100644
--- a/tests/auto/qml/qmlcachegen/qmlcachegen.pro
+++ b/tests/auto/qml/qmlcachegen/qmlcachegen.pro
@@ -17,7 +17,8 @@ RESOURCES += \
data/jsmoduleimport.qml \
data/script.mjs \
data/module.mjs \
- data/utils.mjs
+ data/utils.mjs \
+ data/parameterAdjustment.qml
workerscripts_test.files = \
data/worker.js \
diff --git a/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp b/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp
index 5d87c319f3..f940f9c476 100644
--- a/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp
+++ b/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp
@@ -73,6 +73,8 @@ private slots:
void reproducibleCache_data();
void reproducibleCache();
+
+ void parameterAdjustment();
};
// A wrapper around QQmlComponent to ensure the temporary reference counts
@@ -664,6 +666,14 @@ void tst_qmlcachegen::reproducibleCache()
QCOMPARE(contents1, contents2);
}
+void tst_qmlcachegen::parameterAdjustment()
+{
+ QQmlEngine engine;
+ CleanlyLoadingComponent component(&engine, QUrl("qrc:///data/parameterAdjustment.qml"));
+ QScopedPointer<QObject> obj(component.create());
+ QVERIFY(!obj.isNull()); // Doesn't crash
+}
+
QTEST_GUILESS_MAIN(tst_qmlcachegen)
#include "tst_qmlcachegen.moc"