aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmldatablob_p.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-06-13 15:28:39 +0200
committerUlf Hermann <ulf.hermann@qt.io>2022-06-17 21:12:47 +0200
commitf3d9e9214be92bc79c1d5e58f07f730a6ff31528 (patch)
tree5878b1ea5d12077e7f6fbd584737185fe4f2ae79 /src/qml/qml/qqmldatablob_p.h
parentb616028dae933e7ff6142d41bdafee8ad445a8ec (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. Pick-to: 6.4 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>
Diffstat (limited to 'src/qml/qml/qqmldatablob_p.h')
-rw-r--r--src/qml/qml/qqmldatablob_p.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qml/qml/qqmldatablob_p.h b/src/qml/qml/qqmldatablob_p.h
index d05b29a999..e975043871 100644
--- a/src/qml/qml/qqmldatablob_p.h
+++ b/src/qml/qml/qqmldatablob_p.h
@@ -85,6 +85,11 @@ public:
QDateTime sourceTimeStamp() const;
bool exists() const;
bool isEmpty() const;
+ bool isValid() const
+ {
+ return hasInlineSourceCode || !fileInfo.filePath().isEmpty();
+ }
+
private:
friend class QQmlDataBlob;
friend class QQmlTypeLoader;