aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmljavascriptexpression.cpp
diff options
context:
space:
mode:
authorStephen Kelly <ske@ableton.com>2016-08-12 14:13:29 +0200
committerStephen Kelly <ske@ableton.com>2016-08-15 09:15:11 +0000
commitb7c4d7a25f6327657258acae46bd55a7e62b9b4e (patch)
tree11b1276ce84f8c06d95c007df108fee8faeeea11 /src/qml/qml/qqmljavascriptexpression.cpp
parenteea2754976a6b4363be7575c7082a4df92e1217e (diff)
Fix exponential signal emission growth
Commit 9ab8b9e4 (QML: Do not register static QML dependencies on every call., 2016-04-05) introduced a new concept of separating guards into permanent and active containers. When a property is 'captured' it is added to one or other container. However, while one of the captureProperty overloads added the guards to the correct container, the other overload adds to the wrong container. Presumably this means that a binding can be invoked C+2^N times if the condition for invoking it changes N times. Task-number: QTBUG-55280 Change-Id: I51a31b3dd95825304ba208252289cc5abc744d21 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmljavascriptexpression.cpp')
-rw-r--r--src/qml/qml/qqmljavascriptexpression.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmljavascriptexpression.cpp b/src/qml/qml/qqmljavascriptexpression.cpp
index 5d96240e5b..efa824dfae 100644
--- a/src/qml/qml/qqmljavascriptexpression.cpp
+++ b/src/qml/qml/qqmljavascriptexpression.cpp
@@ -235,7 +235,7 @@ void QQmlPropertyCapture::captureProperty(QQmlNotifier *n, Duration duration)
g->connect(n);
}
- if (duration == OnlyOnce)
+ if (duration == Permanently)
expression->permanentGuards.prepend(g);
else
expression->activeGuards.prepend(g);