summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlcontext_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml/qmlcontext_p.h')
-rw-r--r--src/declarative/qml/qmlcontext_p.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/declarative/qml/qmlcontext_p.h b/src/declarative/qml/qmlcontext_p.h
index fc615b6..60655ae 100644
--- a/src/declarative/qml/qmlcontext_p.h
+++ b/src/declarative/qml/qmlcontext_p.h
@@ -59,6 +59,7 @@
#include <QtCore/qhash.h>
#include <QtScript/qscriptvalue.h>
#include <QtCore/qset.h>
+#include <private/qguard_p.h>
QT_BEGIN_NAMESPACE
@@ -66,6 +67,7 @@ class QmlContext;
class QmlExpression;
class QmlEngine;
class QmlExpression;
+class QmlExpressionPrivate;
class QmlContextPrivate : public QObjectPrivate
{
@@ -87,17 +89,12 @@ public:
QScriptValueList scopeChain;
QUrl url;
- QByteArray typeName;
- int startLine;
- int endLine;
void init();
void dump();
void dump(int depth);
- void destroyed(QObject *);
-
enum Priority {
HighPriority,
NormalPriority
@@ -106,11 +103,26 @@ public:
void invalidateEngines();
QSet<QmlContext *> childContexts;
- QSet<QmlExpression *> childExpressions;
+
+ QmlExpressionPrivate *expressions;
QmlSimpleDeclarativeData contextData;
QObjectList contextObjects;
+ struct ContextGuard : public QGuard<QObject>
+ {
+ QmlContextPrivate *priv;
+ ContextGuard &operator=(QObject *obj) {
+ (QGuard<QObject>&)*this = obj; return *this;
+ }
+ void objectDestroyed(QObject *o) { priv->destroyed(this); }
+ };
+ ContextGuard *idValues;
+ int idValueCount;
+ void setIdProperty(const QString &, int, QObject *);
+ void setIdPropertyCount(int);
+ void destroyed(ContextGuard *);
+
// Only used for debugging
QList<QPointer<QObject> > instances;
};