summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qobject.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2022-06-17 12:36:21 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2022-06-20 19:06:20 +0200
commit0bd287627508c61a7abfd6430d8c1243ea153081 (patch)
tree310868183ec852365f7970c8980727679d2d9abd /src/corelib/kernel/qobject.cpp
parent903bde19a416d82fc255777955237fd410acd690 (diff)
Avoid misleading bindingStatus
Set it to nullptr on clear, and deal with possibly null bindingStatus. Task-number: QTBUG-101177 Task-number: QTBUG-102403 Pick-to: 6.4 Change-Id: I66cb4d505a4f7b377dc90b45ac13834fca19d399 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/corelib/kernel/qobject.cpp')
-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 05a881b63c2..ebdc9e43f0f 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -1873,9 +1873,9 @@ void QObjectPrivate::moveToThread_helper()
Q_Q(QObject);
QEvent e(QEvent::ThreadChange);
QCoreApplication::sendEvent(q, &e);
+ bindingStorage.clear();
for (int i = 0; i < children.size(); ++i) {
QObject *child = children.at(i);
- child->d_func()->bindingStorage.clear();
child->d_func()->moveToThread_helper();
}
}