summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativedeclarativedata_p.h
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-04-08 03:58:04 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-04-08 04:02:58 (GMT)
commit7a092995df36cf5ae380bbebb2828ad468072efc (patch)
tree576da5d4d234178da1c67cc527b5de8bc66222ea /src/declarative/qml/qdeclarativedeclarativedata_p.h
parentfdee72baa6c64d9fdf7d660da24899016a15134f (diff)
downloadQt-7a092995df36cf5ae380bbebb2828ad468072efc.zip
Qt-7a092995df36cf5ae380bbebb2828ad468072efc.tar.gz
Qt-7a092995df36cf5ae380bbebb2828ad468072efc.tar.bz2
Initialize QDeclarativeData even when not using a QDeclarativeEngine
Caused crashes in various test cases
Diffstat (limited to 'src/declarative/qml/qdeclarativedeclarativedata_p.h')
-rw-r--r--src/declarative/qml/qdeclarativedeclarativedata_p.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativedeclarativedata_p.h b/src/declarative/qml/qdeclarativedeclarativedata_p.h
index 87c5c9c..5b12629 100644
--- a/src/declarative/qml/qdeclarativedeclarativedata_p.h
+++ b/src/declarative/qml/qdeclarativedeclarativedata_p.h
@@ -75,7 +75,17 @@ public:
: ownMemory(true), ownContext(false), indestructible(true), explicitIndestructibleSet(false),
context(0), outerContext(0), bindings(0), nextContextObject(0), prevContextObject(0), bindingBitsSize(0),
bindingBits(0), lineNumber(0), columnNumber(0), deferredComponent(0), deferredIdx(0),
- attachedProperties(0), scriptValue(0), propertyCache(0), guards(0) {}
+ attachedProperties(0), scriptValue(0), propertyCache(0), guards(0) {
+ init();
+ }
+
+ static inline void init() {
+ QDeclarativeData::destroyed = destroyed;
+ QDeclarativeData::parentChanged = parentChanged;
+ }
+
+ static void destroyed(QDeclarativeData *, QObject *);
+ static void parentChanged(QDeclarativeData *, QObject *, QObject *);
void destroyed(QObject *);
void parentChanged(QObject *, QObject *);