summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativecontext_p.h
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-04-15 06:35:51 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-04-15 06:35:51 (GMT)
commit30a3e78a12b72ab6f67992ec2f06cd4f21a01a6c (patch)
treebb480e0a908016f24a4e57755b2265ebf5b5ea16 /src/declarative/qml/qdeclarativecontext_p.h
parent6362d17d5551749618f5975e050c54fca31c408f (diff)
downloadQt-30a3e78a12b72ab6f67992ec2f06cd4f21a01a6c.zip
Qt-30a3e78a12b72ab6f67992ec2f06cd4f21a01a6c.tar.gz
Qt-30a3e78a12b72ab6f67992ec2f06cd4f21a01a6c.tar.bz2
Add Component.onDestruction attached property
This property complements Component.onCompleted. It is emitted before the destruction actually begins (for the most part) so the objects are still alive and accessible. The QtObject.onDestroyed signal is now blocked as it never really worked properly anyway.
Diffstat (limited to 'src/declarative/qml/qdeclarativecontext_p.h')
-rw-r--r--src/declarative/qml/qdeclarativecontext_p.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativecontext_p.h b/src/declarative/qml/qdeclarativecontext_p.h
index 5d26e7e..77a6d94 100644
--- a/src/declarative/qml/qdeclarativecontext_p.h
+++ b/src/declarative/qml/qdeclarativecontext_p.h
@@ -106,6 +106,7 @@ public:
static QObject *context_at(QDeclarativeListProperty<QObject> *, int);
};
+class QDeclarativeComponentAttached;
class QDeclarativeGuardedContextData;
class QDeclarativeContextData
{
@@ -113,6 +114,7 @@ public:
QDeclarativeContextData();
QDeclarativeContextData(QDeclarativeContext *);
void destroy();
+ void invalidate();
inline bool isValid() const {
return engine && (!isInternal || !contextObject || !QObjectPrivate::get(contextObject)->wasDeleted);
@@ -123,7 +125,6 @@ public:
QDeclarativeEngine *engine;
void setParent(QDeclarativeContextData *);
- void invalidateEngines();
void refreshExpressions();
void addObject(QObject *);
@@ -194,6 +195,10 @@ public:
// Linked contexts. this owns linkedContext.
QDeclarativeContextData *linkedContext;
+ // Linked list of uses of the Component attached property in this
+ // context
+ QDeclarativeComponentAttached *componentAttached;
+
QString findObjectId(const QObject *obj) const;
static QDeclarativeContextData *get(QDeclarativeContext *context) {