aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmltest/quicktest.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2024-01-05 14:08:32 +0100
committerUlf Hermann <ulf.hermann@qt.io>2024-01-11 00:42:17 +0100
commit7a9a778604a03473b6c4ef8a481ba3cc06d48265 (patch)
tree52ba86a5f11a8dab39e194439f743f294d0ffc6f /src/qmltest/quicktest.cpp
parent5eba4080511a006d10fc86d141d3f0f5abf0b8f8 (diff)
QtQml: Remove QQmlTypeLoader from QQmlImport
The type loader belongs to the engine and we must not store it in engine-independent data structures. We do want the import cache to be stored in the type registry, though (in a separate change). Change-Id: I2828f5098b27bf1fc96852fc2bd160db44b109e7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qmltest/quicktest.cpp')
-rw-r--r--src/qmltest/quicktest.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qmltest/quicktest.cpp b/src/qmltest/quicktest.cpp
index b4bfd94d17..76f823a301 100644
--- a/src/qmltest/quicktest.cpp
+++ b/src/qmltest/quicktest.cpp
@@ -287,7 +287,7 @@ class TestCaseCollector
public:
typedef QList<QString> TestCaseList;
- TestCaseCollector(const QFileInfo &fileInfo, QQmlEngine *engine)
+ TestCaseCollector(const QFileInfo &fileInfo, QQmlEngine *engine) : m_engine(engine)
{
QString path = fileInfo.absoluteFilePath();
if (path.startsWith(QLatin1String(":/")))
@@ -311,6 +311,7 @@ public:
private:
TestCaseList m_testCases;
QList<QQmlError> m_errors;
+ QQmlEngine *m_engine = nullptr;
struct TestCaseEnumerationResult
{
@@ -353,7 +354,8 @@ private:
if (!typeQualifier.isEmpty())
testCaseTypeName = typeQualifier % QLatin1Char('.') % testCaseTypeName;
- testCaseType = compilationUnit->typeNameCache->query(testCaseTypeName).type;
+ testCaseType = compilationUnit->typeNameCache->query(
+ testCaseTypeName, QQmlTypeLoader::get(m_engine)).type;
if (testCaseType.isValid())
break;
}