From 70628a44fa1c9a67d2de75a470eaccd8521747fc Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Sat, 8 Dec 2012 11:03:03 -0800 Subject: Specify better increment for captured properties There aren't that many captured properties, decreasing the increment will give better performance. Change-Id: Iddb17c695eda5513f2d038123f4c886e559d8f6a Reviewed-by: Christopher Adams --- src/declarative/qml/qdeclarativeengine_p.h | 2 +- src/declarative/qml/qdeclarativeexpression.cpp | 4 ++-- src/declarative/qml/qdeclarativeexpression_p.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/declarative/qml/qdeclarativeengine_p.h b/src/declarative/qml/qdeclarativeengine_p.h index cc1d5520..4f22b94d 100644 --- a/src/declarative/qml/qdeclarativeengine_p.h +++ b/src/declarative/qml/qdeclarativeengine_p.h @@ -157,7 +157,7 @@ public: int notifyIndex; }; bool captureProperties; - QPODVector capturedProperties; + QPODVector capturedProperties; QDeclarativeContext *rootContext; bool isDebugging; diff --git a/src/declarative/qml/qdeclarativeexpression.cpp b/src/declarative/qml/qdeclarativeexpression.cpp index b52a0748..58897c9e 100644 --- a/src/declarative/qml/qdeclarativeexpression.cpp +++ b/src/declarative/qml/qdeclarativeexpression.cpp @@ -460,7 +460,7 @@ QScriptValue QDeclarativeQtScriptExpression::scriptValue(QObject *secondaryScope QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(context()->engine); bool lastCaptureProperties = ep->captureProperties; - QPODVector lastCapturedProperties; + QPODVector lastCapturedProperties; ep->captureProperties = trackChange; ep->capturedProperties.copyAndClear(lastCapturedProperties); @@ -539,7 +539,7 @@ QScriptValue QDeclarativeQtScriptExpression::eval(QObject *secondaryScope, bool } } -void QDeclarativeQtScriptExpression::updateGuards(const QPODVector &properties) +void QDeclarativeQtScriptExpression::updateGuards(const QPODVector &properties) { Q_ASSERT(guardObject); Q_ASSERT(guardObjectNotifyIndex != -1); diff --git a/src/declarative/qml/qdeclarativeexpression_p.h b/src/declarative/qml/qdeclarativeexpression_p.h index 6e8df8ae..402ae846 100644 --- a/src/declarative/qml/qdeclarativeexpression_p.h +++ b/src/declarative/qml/qdeclarativeexpression_p.h @@ -153,7 +153,7 @@ public: private: void clearGuards(); QScriptValue eval(QObject *secondaryScope, bool *isUndefined); - void updateGuards(const QPODVector &properties); + void updateGuards(const QPODVector &properties); bool trackChange; -- cgit v1.2.3