aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlmetatype_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2017-09-12 15:13:33 +0200
committerLars Knoll <lars.knoll@qt.io>2017-09-12 19:50:13 +0000
commit98358715930739ca8de172d88c5ce6941c275ff3 (patch)
tree614a2af39d4b8fc122d3900281c6a3ca1ec8331e /src/qml/qml/qqmlmetatype_p.h
parent78d574a909a4bcf7543fba8d921e8658dfbc0200 (diff)
Fix qml cache invalidation when changing dependent C++ registered QML singletons
When a qml file uses a qml singleton, we need to reliably detect when the singleton changes and re-generate the cache of the qml file using it. This is a scenario covered and fixed by commit 5b94de09cc738837d1539e28b3c0dccd17c18d29, with the exception that currently QML singletons registered via qmlRegisterSingleton were not added to the list of dependent singletons for a qml file. We can fix this by extending findCompositeSingletons() to also cover the singletons that do not originate from a qmldir file. [ChangeLog][Qt][Qml] Fixed bug where sometimes changes to a qml singleton would not propagate to the users or cause crashes. Task-number: QTBUG-62243 Change-Id: I16c3d9ba65fd82e898a29b946c341907751135a9 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlmetatype_p.h')
-rw-r--r--src/qml/qml/qqmlmetatype_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlmetatype_p.h b/src/qml/qml/qqmlmetatype_p.h
index ac2133ba30..9a7736ffcd 100644
--- a/src/qml/qml/qqmlmetatype_p.h
+++ b/src/qml/qml/qqmlmetatype_p.h
@@ -298,6 +298,8 @@ public:
QQmlType type(const QHashedStringRef &, int) const;
QQmlType type(const QV4::String *, int) const;
+ void walkCompositeSingletons(const std::function<void(const QQmlType &)> &callback) const;
+
QQmlTypeModulePrivate *priv() { return d; }
private:
//Used by register functions and creates the QQmlTypeModule for them