diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-12-23 04:17:55 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-12-23 04:17:55 (GMT) |
commit | 4fe8f2ab89ace6e617a81c5e8568c3830135da20 (patch) | |
tree | 900e99845dee1d8717d2a816133971ed3c5653c8 /src/declarative/qml/qmlcontextscriptclass.cpp | |
parent | b95cf9eccc4a84036c7b5d1443e598d3db2f2d70 (diff) | |
download | Qt-4fe8f2ab89ace6e617a81c5e8568c3830135da20.zip Qt-4fe8f2ab89ace6e617a81c5e8568c3830135da20.tar.gz Qt-4fe8f2ab89ace6e617a81c5e8568c3830135da20.tar.bz2 |
Stop using QGuard
This should allow QGuard to be removed from Qt and QObjectPrivate::ExtraData.
Having QmlGuard inside QmlDeclarativeData reduces the number of new's, and
creating QmlDeclarativeData is faster than QObjectPrivate::ExtraData anyway.
Diffstat (limited to 'src/declarative/qml/qmlcontextscriptclass.cpp')
-rw-r--r-- | src/declarative/qml/qmlcontextscriptclass.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/declarative/qml/qmlcontextscriptclass.cpp b/src/declarative/qml/qmlcontextscriptclass.cpp index 54a5ca3..588a397 100644 --- a/src/declarative/qml/qmlcontextscriptclass.cpp +++ b/src/declarative/qml/qmlcontextscriptclass.cpp @@ -44,14 +44,15 @@ #include "qmlengine_p.h" #include "qmlcontext_p.h" #include "qmltypenamescriptclass_p.h" +#include "qmlguard_p.h" QT_BEGIN_NAMESPACE struct ContextData : public QScriptDeclarativeClass::Object { ContextData() : isSharedContext(true) {} ContextData(QmlContext *c, QObject *o) : context(c), scopeObject(o), isSharedContext(false) {} - QGuard<QmlContext> context; - QGuard<QObject> scopeObject; + QmlGuard<QmlContext> context; + QmlGuard<QObject> scopeObject; bool isSharedContext; QmlContext *getContext(QmlEngine *engine) { |