aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-06-13 15:28:39 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-06-18 04:18:17 +0000
commit45ba50f7bd33eaca23927cd720c7b89eeb006675 (patch)
tree8b473093a2aa753eafcf6ddd56206e87d6ad09b7 /tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
parentd23ee198656db1998e213d6befaa93e3d79c2d91 (diff)
QML: Drop backup source code once we're done with it
If a component is done loading, we don't need the source code anymore. Dropping it makes it possible to unmap any resources it may be part of. Fixes: QTBUG-86088 Change-Id: Id523fffb788b5ffa60cb1e7b777328c6648c2a88 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit f3d9e9214be92bc79c1d5e58f07f730a6ff31528) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp')
-rw-r--r--tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
index 548004b24e..b9b7d3e6a9 100644
--- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
+++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
@@ -2524,6 +2524,7 @@ void tst_qqmllanguage::scriptStringWithoutSourceCode()
QQmlEnginePrivate *eng = QQmlEnginePrivate::get(&engine);
QQmlRefPointer<QQmlTypeData> td = eng->typeLoader.getType(url);
Q_ASSERT(td);
+ QVERIFY(!td->backupSourceCode().isValid());
QQmlRefPointer<QV4::ExecutableCompilationUnit> compilationUnit = td->compilationUnit();
readOnlyQmlUnit.reset(compilationUnit->unitData());