summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativepropertycache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml/qdeclarativepropertycache.cpp')
-rw-r--r--src/declarative/qml/qdeclarativepropertycache.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/declarative/qml/qdeclarativepropertycache.cpp b/src/declarative/qml/qdeclarativepropertycache.cpp
index 111259d..888945b 100644
--- a/src/declarative/qml/qdeclarativepropertycache.cpp
+++ b/src/declarative/qml/qdeclarativepropertycache.cpp
@@ -147,7 +147,7 @@ QDeclarativePropertyCache::Data QDeclarativePropertyCache::create(const QMetaObj
}
int methodCount = metaObject->methodCount();
- for (int ii = methodCount - 1; ii >= 0; --ii) {
+ for (int ii = methodCount - 1; ii >= 2; --ii) { // >=2 to block the destroyed signal
QMetaMethod m = metaObject->method(ii);
if (m.access() == QMetaMethod::Private)
continue;
@@ -216,7 +216,7 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb
}
int methodCount = metaObject->methodCount();
- int methodOffset = metaObject->methodOffset();
+ int methodOffset = qMax(2, metaObject->methodOffset()); // 2 to block the destroyed signal
for (int ii = methodOffset; ii < methodCount; ++ii) {
QMetaMethod m = metaObject->method(ii);
if (m.access() == QMetaMethod::Private)
@@ -289,7 +289,7 @@ void QDeclarativePropertyCache::update(QDeclarativeEngine *engine, const QMetaOb
}
int methodCount = metaObject->methodCount();
- for (int ii = methodCount - 1; ii >= 0; --ii) {
+ for (int ii = methodCount - 1; ii >= 2; --ii) { // >=2 to block the destroyed signal
QMetaMethod m = metaObject->method(ii);
if (m.access() == QMetaMethod::Private)
continue;
@@ -368,7 +368,7 @@ QDeclarativePropertyCache::Data *QDeclarativePropertyCache::property(QDeclarativ
QDeclarativeEnginePrivate *enginePrivate = QDeclarativeEnginePrivate::get(engine);
QDeclarativePropertyCache *cache = 0;
- QDeclarativeDeclarativeData *ddata = QDeclarativeDeclarativeData::get(obj);
+ QDeclarativeData *ddata = QDeclarativeData::get(obj);
if (ddata && ddata->propertyCache && ddata->propertyCache->qmlEngine() == engine)
cache = ddata->propertyCache;
if (!cache) {
@@ -400,7 +400,7 @@ QDeclarativePropertyCache::Data *QDeclarativePropertyCache::property(QDeclarativ
QDeclarativeEnginePrivate *enginePrivate = QDeclarativeEnginePrivate::get(engine);
QDeclarativePropertyCache *cache = 0;
- QDeclarativeDeclarativeData *ddata = QDeclarativeDeclarativeData::get(obj);
+ QDeclarativeData *ddata = QDeclarativeData::get(obj);
if (ddata && ddata->propertyCache && ddata->propertyCache->qmlEngine() == engine)
cache = ddata->propertyCache;
if (!cache) {