aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/ftw
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-07-01 01:00:48 +0200
committerUlf Hermann <ulf.hermann@qt.io>2019-07-01 10:29:06 +0200
commite6c6cc8fde26bd0b9d37a1812593f17df0b4159a (patch)
tree6aae6724e24a1e051d271e5f67baab5acc358313 /src/qml/qml/ftw
parent16289f35eb08a9b9a6d56ea8dec549b1f17e4daf (diff)
parent3ecec55e534214aced70ccab7cc929cfb57738a2 (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts: src/imports/imports.pro src/qml/qml/qqmlmetatype.cpp Change-Id: I308436caf55402cb2246cb591c6ac8f83e1febf8
Diffstat (limited to 'src/qml/qml/ftw')
-rw-r--r--src/qml/qml/ftw/qqmlthread.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/qml/qml/ftw/qqmlthread.cpp b/src/qml/qml/ftw/qqmlthread.cpp
index 2ef1dc7e93..e961ed3d0d 100644
--- a/src/qml/qml/ftw/qqmlthread.cpp
+++ b/src/qml/qml/ftw/qqmlthread.cpp
@@ -104,14 +104,18 @@ QQmlThreadPrivate::MainObject::MainObject(QQmlThreadPrivate *p)
// Trigger mainEvent in main thread. Must be called from thread.
void QQmlThreadPrivate::triggerMainEvent()
{
+#if QT_CONFIG(thread)
Q_ASSERT(q->isThisThread());
+#endif
QCoreApplication::postEvent(&m_mainObject, new QEvent(QEvent::User));
}
// Trigger even in thread. Must be called from main thread.
void QQmlThreadPrivate::triggerThreadEvent()
{
+#if QT_CONFIG(thread)
Q_ASSERT(!q->isThisThread());
+#endif
QCoreApplication::postEvent(this, new QEvent(QEvent::User));
}
@@ -353,6 +357,12 @@ void QQmlThread::internalCallMethodInThread(Message *message)
void QQmlThread::internalCallMethodInMain(Message *message)
{
+#if !QT_CONFIG(thread)
+ message->call(this);
+ delete message;
+ return;
+#endif
+
Q_ASSERT(isThisThread());
d->lock();
@@ -397,7 +407,9 @@ void QQmlThread::internalPostMethodToThread(Message *message)
void QQmlThread::internalPostMethodToMain(Message *message)
{
+#if QT_CONFIG(thread)
Q_ASSERT(isThisThread());
+#endif
d->lock();
bool wasEmpty = d->mainList.isEmpty();
d->mainList.append(message);
@@ -408,7 +420,9 @@ void QQmlThread::internalPostMethodToMain(Message *message)
void QQmlThread::waitForNextMessage()
{
+#if QT_CONFIG(thread)
Q_ASSERT(!isThisThread());
+#endif
d->lock();
Q_ASSERT(d->m_mainThreadWaiting == false);