aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlbinding_p.h
diff options
context:
space:
mode:
authorAnton Kreuzkamp <anton.kreuzkamp@kdab.com>2017-04-26 16:31:48 +0200
committerAnton Kreuzkamp <anton.kreuzkamp@kdab.com>2017-08-13 04:07:30 +0000
commit17513266b81e88b84fda250734f07c94a198fabc (patch)
tree2bb498ba41df15971035fb040bf4c07e8369fbc3 /src/qml/qml/qqmlbinding_p.h
parent041c8d28eaa0e516a0c6502fa801781aa8ebe5a6 (diff)
Add API to learn about QQmlBinding's dependencies
Adds a method `dependencies()` to QQmlBinding, that returns a QVector<QQmlProperty> of all properties the binding depends on. The API is meant to be used in debugging tools (e.g. in GammaRay). Also adds a public method subBindings() to QQmlValueTypeProxyBinding in order to be able to access their dependencies. Change-Id: Ib833703ec9e632661626c4532b8d73997f38e62b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlbinding_p.h')
-rw-r--r--src/qml/qml/qqmlbinding_p.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlbinding_p.h b/src/qml/qml/qqmlbinding_p.h
index 1c894148e4..38d59a8919 100644
--- a/src/qml/qml/qqmlbinding_p.h
+++ b/src/qml/qml/qqmlbinding_p.h
@@ -102,6 +102,15 @@ public:
QString expressionIdentifier() const override;
void expressionChanged() override;
+ /**
+ * This method returns a snapshot of the currently tracked dependencies of
+ * this binding. The dependencies can change upon reevaluation. This method is
+ * used in GammaRay to visualize binding hierarchies.
+ *
+ * Call this method from the UI thread.
+ */
+ QVector<QQmlProperty> dependencies() const;
+
protected:
virtual void doUpdate(const DeleteWatcher &watcher,
QQmlPropertyData::WriteFlags flags, QV4::Scope &scope) = 0;