diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-03-16 02:09:27 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-03-16 02:09:27 (GMT) |
commit | dd703f7a7e676f26dcb3ad634d75e0c9f677db43 (patch) | |
tree | f29f903c584349fe7ef67d43613f9fddaeb85aba /src/declarative/qml/qdeclarativecontext_p.h | |
parent | 081fafe395d52ae42b57c36d1279e6ac05ae2cde (diff) | |
parent | e56c5483fe8b292545bb9f004d796abd8ae00589 (diff) | |
download | Qt-dd703f7a7e676f26dcb3ad634d75e0c9f677db43.zip Qt-dd703f7a7e676f26dcb3ad634d75e0c9f677db43.tar.gz Qt-dd703f7a7e676f26dcb3ad634d75e0c9f677db43.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Conflicts:
src/declarative/qml/qdeclarativeengine.cpp
tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
Diffstat (limited to 'src/declarative/qml/qdeclarativecontext_p.h')
-rw-r--r-- | src/declarative/qml/qdeclarativecontext_p.h | 45 |
1 files changed, 9 insertions, 36 deletions
diff --git a/src/declarative/qml/qdeclarativecontext_p.h b/src/declarative/qml/qdeclarativecontext_p.h index 8297280..a1056b1 100644 --- a/src/declarative/qml/qdeclarativecontext_p.h +++ b/src/declarative/qml/qdeclarativecontext_p.h @@ -59,6 +59,7 @@ #include "qdeclarativeengine_p.h" #include "qdeclarativeintegercache_p.h" #include "qdeclarativetypenamecache_p.h" +#include "qdeclarativenotifier_p.h" #include <QtCore/qhash.h> #include <QtScript/qscriptvalue.h> @@ -93,8 +94,7 @@ public: QList<QVariant> propertyValues; int notifyIndex; - QObjectList defaultObjects; - int highPriorityCount; + QObject *contextObject; QList<QScriptValue> scripts; void addScript(const QDeclarativeParser::Object::ScriptBlock &, QObject *); @@ -107,25 +107,16 @@ public: void invalidateEngines(); void refreshExpressions(); - QSet<QDeclarativeContext *> childContexts; + + QDeclarativeContext *childContexts; + + QDeclarativeContext *nextChild; + QDeclarativeContext **prevChild; QDeclarativeAbstractExpression *expressions; QDeclarativeDeclarativeData *contextObjects; - struct IdNotifier - { - inline IdNotifier(); - inline ~IdNotifier(); - - inline void clear(); - - IdNotifier *next; - IdNotifier**prev; - QObject *target; - int methodIndex; - }; - struct ContextGuard : public QDeclarativeGuard<QObject> { inline ContextGuard(); @@ -133,7 +124,7 @@ public: inline virtual void objectDestroyed(QObject *); QDeclarativeContextPrivate *priv; - IdNotifier *bindings; + QDeclarativeNotifier bindings; }; ContextGuard *idValues; int idValueCount; @@ -157,26 +148,8 @@ public: static QObject *context_at(QDeclarativeListProperty<QObject> *, int); }; -QDeclarativeContextPrivate::IdNotifier::IdNotifier() -: next(0), prev(0), target(0), methodIndex(-1) -{ -} - -QDeclarativeContextPrivate::IdNotifier::~IdNotifier() -{ - clear(); -} - -void QDeclarativeContextPrivate::IdNotifier::clear() -{ - if (next) next->prev = prev; - if (prev) *prev = next; - next = 0; prev = 0; target = 0; - methodIndex = -1; -} - QDeclarativeContextPrivate::ContextGuard::ContextGuard() -: priv(0), bindings(0) +: priv(0) { } |