aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quicktest/quicktestmainwithsetup/imports/ImportPathQmlModule/ImportPathQmlType.qml
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2019-03-08 10:51:57 +0100
committerMitch Curtis <mitch.curtis@qt.io>2019-03-21 09:07:14 +0000
commit52ac0ea8cbdc9a2b8e895ceee09994fba229ee12 (patch)
treed279d868eb4d610138300a54b227559b9b29f3b3 /tests/auto/quicktest/quicktestmainwithsetup/imports/ImportPathQmlModule/ImportPathQmlType.qml
parentc091f3f4b4889ac6be26e018c5e8b673adee7c47 (diff)
QUICK_TEST_MAIN_WITH_SETUP: fix qmlEngineAvailable() being called too late
When I added the macro, I wasn't aware that TestCaseCollector was a thing. TestCaseCollector loads each QML file without running the tests (i.e. creates a QQmlComponent from the file without creating an object from that component). Since it still executes imports, the test can fail if types are registered or import paths added in qmlEngineAvailable(), since it's called too late. So, call it earlier. This should have no adverse effect on user code, as nothing of importance to the user will be skipped, and the documentation already details what can be expected by the time qmlEngineAvailable() is called. Change-Id: Ibd3a4b728bc87b90f89cc310fddf668c5879ad83 Fixes: QTBUG-74160 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/quicktest/quicktestmainwithsetup/imports/ImportPathQmlModule/ImportPathQmlType.qml')
-rw-r--r--tests/auto/quicktest/quicktestmainwithsetup/imports/ImportPathQmlModule/ImportPathQmlType.qml3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/quicktest/quicktestmainwithsetup/imports/ImportPathQmlModule/ImportPathQmlType.qml b/tests/auto/quicktest/quicktestmainwithsetup/imports/ImportPathQmlModule/ImportPathQmlType.qml
new file mode 100644
index 0000000000..617bdaaf67
--- /dev/null
+++ b/tests/auto/quicktest/quicktestmainwithsetup/imports/ImportPathQmlModule/ImportPathQmlType.qml
@@ -0,0 +1,3 @@
+import QtQuick 2.0
+
+Item {}