summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/kernel/qobject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index e062a38185..f8664ba3a2 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -1876,7 +1876,7 @@ void QObjectPrivate::setParent_helper(QObject *o)
}
}
}
- if (!isDeletingChildren && declarativeData && QAbstractDeclarativeData::parentChanged)
+ if (!wasDeleted && !isDeletingChildren && declarativeData && QAbstractDeclarativeData::parentChanged)
QAbstractDeclarativeData::parentChanged(declarativeData, q, o);
}