diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-03-05 06:26:40 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-03-05 06:27:35 (GMT) |
commit | 4a6154ec912d5b84a556aa731c5b7de8f758ba3d (patch) | |
tree | 2c9763d531d93c47eb677b4e100a0b4487dde9d4 /src/declarative/qml | |
parent | b075f407c724cbe4b96b9936c8cf91b88c526619 (diff) | |
download | Qt-4a6154ec912d5b84a556aa731c5b7de8f758ba3d.zip Qt-4a6154ec912d5b84a556aa731c5b7de8f758ba3d.tar.gz Qt-4a6154ec912d5b84a556aa731c5b7de8f758ba3d.tar.bz2 |
Minor perf improvement when running QML script blocks
There is no need to capture a property access if a binding is not being
evaluated.
Diffstat (limited to 'src/declarative/qml')
-rw-r--r-- | src/declarative/qml/qdeclarativecontextscriptclass.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/declarative/qml/qdeclarativecontextscriptclass.cpp b/src/declarative/qml/qdeclarativecontextscriptclass.cpp index d6305d8..5fcf4e2 100644 --- a/src/declarative/qml/qdeclarativecontextscriptclass.cpp +++ b/src/declarative/qml/qdeclarativecontextscriptclass.cpp @@ -262,8 +262,9 @@ QDeclarativeContextScriptClass::property(Object *object, const Identifier &name) } } - ep->capturedProperties << - QDeclarativeEnginePrivate::CapturedProperty(bindContext, -1, lastPropertyIndex + cp->notifyIndex); + if (ep->captureProperties) + ep->capturedProperties << QDeclarativeEnginePrivate::CapturedProperty(bindContext, -1, lastPropertyIndex + cp->notifyIndex); + return Value(scriptEngine, rv); } else if(lastDefaultObject != -1) { |