summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/kernel/qobject.cpp')
-rw-r--r--src/corelib/kernel/qobject.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 4d0523c898..5bb225d396 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -1532,6 +1532,10 @@ void QObject::moveToThread(QThread *targetThread)
qWarning("QObject::moveToThread: Widgets cannot be moved to a new thread");
return;
}
+ if (!d->bindingStorage.isEmpty()) {
+ qWarning("QObject::moveToThread: Can not move objects that contain bindings or are used in bindings to a new thread.");
+ return;
+ }
QThreadData *currentData = QThreadData::current();
QThreadData *targetData = targetThread ? QThreadData::get2(targetThread) : nullptr;
@@ -4046,6 +4050,24 @@ QList<QByteArray> QObject::dynamicPropertyNames() const
return QList<QByteArray>();
}
+/*!
+ \internal
+*/
+QBindingStorage *QObject::bindingStorage()
+{
+ Q_D(QObject);
+ return &d->bindingStorage;
+}
+
+/*!
+ \internal
+*/
+const QBindingStorage *QObject::bindingStorage() const
+{
+ Q_D(const QObject);
+ return &d->bindingStorage;
+}
+
#endif // QT_NO_PROPERTIES