aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmltest/quicktest.cpp
diff options
context:
space:
mode:
authorUlf Hermann <[email protected]>2024-01-10 09:22:19 +0100
committerUlf Hermann <[email protected]>2024-01-20 23:59:24 +0100
commit930c8f186ac07f3462de41bcba6cf9d881e79fc2 (patch)
tree555a8cc6d26691dac2f4f4d2dfd3a1e7b7dab9fb /src/qmltest/quicktest.cpp
parentaf212e5e4edb73978298cd030b15deb8d8c28183 (diff)
QtQml: Use CompiledData::CompilationUnit in more places
We rarely actually need the executable CU, and where we need it, we can dynamically create or retrieve it from the engine. To that end, store all the CUs in the same container in the engine. Change-Id: I0b786048c578ac4f41ae4aee601da850fa400f2e Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
Diffstat (limited to 'src/qmltest/quicktest.cpp')
-rw-r--r--src/qmltest/quicktest.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qmltest/quicktest.cpp b/src/qmltest/quicktest.cpp
index c762e34a2e..a10bbb0a15 100644
--- a/src/qmltest/quicktest.cpp
+++ b/src/qmltest/quicktest.cpp
@@ -299,7 +299,8 @@ public:
if (component.isReady()) {
QQmlRefPointer<QV4::ExecutableCompilationUnit> rootCompilationUnit
= QQmlComponentPrivate::get(&component)->compilationUnit;
- TestCaseEnumerationResult result = enumerateTestCases(rootCompilationUnit.data());
+ TestCaseEnumerationResult result = enumerateTestCases(
+ rootCompilationUnit->baseCompilationUnit().data());
m_testCases = result.testCases + result.finalizedPartialTestCases();
m_errors += result.errors;
}
@@ -340,7 +341,7 @@ private:
};
TestCaseEnumerationResult enumerateTestCases(
- const QQmlRefPointer<QV4::ExecutableCompilationUnit> &compilationUnit,
+ const QQmlRefPointer<QV4::CompiledData::CompilationUnit> &compilationUnit,
const Object *object = nullptr)
{
QQmlType testCaseType;
@@ -354,7 +355,7 @@ private:
if (!typeQualifier.isEmpty())
testCaseTypeName = typeQualifier % QLatin1Char('.') % testCaseTypeName;
- testCaseType = compilationUnit->typeNameCache()->query(
+ testCaseType = compilationUnit->typeNameCache->query(
testCaseTypeName, QQmlTypeLoader::get(m_engine)).type;
if (testCaseType.isValid())
break;