summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativecontext_p.h
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-15 17:00:07 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-15 17:00:07 (GMT)
commit737c0c8d9aa319384ef0bcbed4e709deb2239e75 (patch)
tree4776d0ff27ed18e57c298f1ac99a9c57a0d5eea6 /src/declarative/qml/qdeclarativecontext_p.h
parent33c6983a19942c151fa0bcc878b5219e0b641ba9 (diff)
parent83fe3a8e1f12ddfb6fc8d42f007816c122bed94d (diff)
downloadQt-737c0c8d9aa319384ef0bcbed4e709deb2239e75.zip
Qt-737c0c8d9aa319384ef0bcbed4e709deb2239e75.tar.gz
Qt-737c0c8d9aa319384ef0bcbed4e709deb2239e75.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (89 commits) Compile with user defined Qt namespace Fix regression from previous commit Import "content" with as qualifier to support network without qmldir Small fixes to photoviewer demo Fix benchmark. Add basic QUrl benchmarks. Add busy indicator to photoviewer demo Set maximumExtents correctly for highlightRangeMode: StrictlyEnforceRange fix installation of imports libraries QDeclarative::isWritable optimization. Make easing docs more consistent with other grouped property docs. Make the loader a focusscope. Fix typo. Use reliable local server for HTTP testing. Fix installation of imports libraries Change PathView offset property to use range 0 - 1.0 Tweak benchmark Optimization: Use linked list for context children Add new declarative photoviewer demo Remove dead code ...
Diffstat (limited to 'src/declarative/qml/qdeclarativecontext_p.h')
-rw-r--r--src/declarative/qml/qdeclarativecontext_p.h45
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)
{
}