diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2019-03-08 10:51:57 +0100 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2019-03-21 09:07:14 +0000 |
commit | 52ac0ea8cbdc9a2b8e895ceee09994fba229ee12 (patch) | |
tree | d279d868eb4d610138300a54b227559b9b29f3b3 /qtdeclarative.doxy | |
parent | c091f3f4b4889ac6be26e018c5e8b673adee7c47 (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 'qtdeclarative.doxy')
0 files changed, 0 insertions, 0 deletions