summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlexpression.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-01-08 04:22:07 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-01-08 04:22:07 (GMT)
commit6db0dd65bdb9d999f5f5bbb54808517d3d212315 (patch)
tree4934ac2cbb46745741173a39d13b996d015248d0 /src/declarative/qml/qmlexpression.cpp
parent83044621103a12906394a35fbdcba966171bb507 (diff)
downloadQt-6db0dd65bdb9d999f5f5bbb54808517d3d212315.zip
Qt-6db0dd65bdb9d999f5f5bbb54808517d3d212315.tar.gz
Qt-6db0dd65bdb9d999f5f5bbb54808517d3d212315.tar.bz2
Optimization: Improve property read speed
Diffstat (limited to 'src/declarative/qml/qmlexpression.cpp')
-rw-r--r--src/declarative/qml/qmlexpression.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/declarative/qml/qmlexpression.cpp b/src/declarative/qml/qmlexpression.cpp
index 652c5f8..1321601 100644
--- a/src/declarative/qml/qmlexpression.cpp
+++ b/src/declarative/qml/qmlexpression.cpp
@@ -436,10 +436,12 @@ QVariant QmlExpressionPrivate::value(QObject *secondaryScope, bool *isUndefined)
QmlEnginePrivate *ep = QmlEnginePrivate::get(q->engine());
QmlExpression *lastCurrentExpression = ep->currentExpression;
+ bool lastCaptureProperties = ep->captureProperties;
QPODVector<QmlEnginePrivate::CapturedProperty> lastCapturedProperties;
ep->capturedProperties.copyAndClear(lastCapturedProperties);
ep->currentExpression = q;
+ ep->captureProperties = data->trackChange;
// This object might be deleted during the eval
QmlExpressionData *localData = data;
@@ -452,6 +454,7 @@ QVariant QmlExpressionPrivate::value(QObject *secondaryScope, bool *isUndefined)
}
ep->currentExpression = lastCurrentExpression;
+ ep->captureProperties = lastCaptureProperties;
// Check if we were deleted
if (localData->q) {