summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-03-15 05:58:35 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-03-17 00:20:49 (GMT)
commit26cd94ef47ffc969dc835e98b58eded14e669964 (patch)
tree9ec8e418ec0ce385bd07289d5368e221a5ce017e /src/declarative/qml/qdeclarativeobjectscriptclass.cpp
parent06766918436dc6c5de2e605e7ed3421c548c6782 (diff)
downloadQt-26cd94ef47ffc969dc835e98b58eded14e669964.zip
Qt-26cd94ef47ffc969dc835e98b58eded14e669964.tar.gz
Qt-26cd94ef47ffc969dc835e98b58eded14e669964.tar.bz2
Optimization: Reduce unnecessary QObject allocations
Diffstat (limited to 'src/declarative/qml/qdeclarativeobjectscriptclass.cpp')
-rw-r--r--src/declarative/qml/qdeclarativeobjectscriptclass.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
index 32a28fe..027166a 100644
--- a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
+++ b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
@@ -142,7 +142,7 @@ QDeclarativeObjectScriptClass::queryProperty(Object *object, const Identifier &n
QScriptClass::QueryFlags
QDeclarativeObjectScriptClass::queryProperty(QObject *obj, const Identifier &name,
- QScriptClass::QueryFlags flags, QDeclarativeContext *evalContext,
+ QScriptClass::QueryFlags flags, QDeclarativeContextData *evalContext,
QueryHints hints)
{
Q_UNUSED(flags);
@@ -173,15 +173,11 @@ QDeclarativeObjectScriptClass::queryProperty(QObject *obj, const Identifier &nam
}
}
- if (evalContext) {
- QDeclarativeContextPrivate *cp = QDeclarativeContextPrivate::get(evalContext);
-
- if (cp->imports) {
- QDeclarativeTypeNameCache::Data *data = cp->imports->data(name);
- if (data) {
- lastTNData = data;
- return QScriptClass::HandlesReadAccess;
- }
+ if (evalContext && evalContext->imports) {
+ QDeclarativeTypeNameCache::Data *data = evalContext->imports->data(name);
+ if (data) {
+ lastTNData = data;
+ return QScriptClass::HandlesReadAccess;
}
}
}
@@ -316,7 +312,7 @@ void QDeclarativeObjectScriptClass::setProperty(Object *object,
void QDeclarativeObjectScriptClass::setProperty(QObject *obj,
const Identifier &name,
const QScriptValue &value,
- QDeclarativeContext *evalContext)
+ QDeclarativeContextData *evalContext)
{
Q_UNUSED(name);