summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlcontextscriptclass.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-01-28 04:52:26 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-01-28 04:52:26 (GMT)
commit044c93a48213e325f486c3076837a2a7cebbe9aa (patch)
tree628c1b627ff97de93a4bcc7d5a1e88a6d1664a18 /src/declarative/qml/qmlcontextscriptclass.cpp
parentcfc536842a205a951457e2630b04de2262ffaa46 (diff)
downloadQt-044c93a48213e325f486c3076837a2a7cebbe9aa.zip
Qt-044c93a48213e325f486c3076837a2a7cebbe9aa.tar.gz
Qt-044c93a48213e325f486c3076837a2a7cebbe9aa.tar.bz2
Optimization: Skip attached property search where possible
QTBUG-6734
Diffstat (limited to 'src/declarative/qml/qmlcontextscriptclass.cpp')
-rw-r--r--src/declarative/qml/qmlcontextscriptclass.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/declarative/qml/qmlcontextscriptclass.cpp b/src/declarative/qml/qmlcontextscriptclass.cpp
index eecc611..80d52ad 100644
--- a/src/declarative/qml/qmlcontextscriptclass.cpp
+++ b/src/declarative/qml/qmlcontextscriptclass.cpp
@@ -174,7 +174,8 @@ QmlContextScriptClass::queryProperty(QmlContext *bindContext, QObject *scopeObje
if (scopeObject) {
QScriptClass::QueryFlags rv =
- ep->objectClass->queryProperty(scopeObject, name, flags, bindContext, QmlObjectScriptClass::ImplicitObject);
+ ep->objectClass->queryProperty(scopeObject, name, flags, bindContext,
+ QmlObjectScriptClass::ImplicitObject | QmlObjectScriptClass::SkipAttachedProperties);
if (rv) {
lastScopeObject = scopeObject;
lastContext = bindContext;
@@ -184,7 +185,8 @@ QmlContextScriptClass::queryProperty(QmlContext *bindContext, QObject *scopeObje
for (int ii = cp->defaultObjects.count() - 1; ii >= 0; --ii) {
QScriptClass::QueryFlags rv =
- ep->objectClass->queryProperty(cp->defaultObjects.at(ii), name, flags, bindContext, QmlObjectScriptClass::ImplicitObject);
+ ep->objectClass->queryProperty(cp->defaultObjects.at(ii), name, flags, bindContext,
+ QmlObjectScriptClass::ImplicitObject | QmlObjectScriptClass::SkipAttachedProperties);
if (rv) {
lastDefaultObject = ii;