diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2022-09-16 14:04:58 +0200 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2022-09-19 16:20:56 +0200 |
commit | c506b7182fe0aa94cb70c4efb7f3230cbd12845e (patch) | |
tree | d119687a711aaed4a6e7e43cb400b852ba7caec9 /src/qml/qml/ftw | |
parent | 7bcfc16ca2790b387b734f1f37eb43198f05994a (diff) |
Avoid unlock/lock dance before waitForNextMessage
Change-Id: I63f2c01b3ca28b0703be6af80f8f7e757948a852
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/qml/ftw')
-rw-r--r-- | src/qml/qml/ftw/qqmlthread.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/qml/qml/ftw/qqmlthread.cpp b/src/qml/qml/ftw/qqmlthread.cpp index b33bbffc57..8589402bff 100644 --- a/src/qml/qml/ftw/qqmlthread.cpp +++ b/src/qml/qml/ftw/qqmlthread.cpp @@ -365,6 +365,7 @@ void QQmlThread::internalPostMethodToMain(Message *message) /*! \internal \note This method must be called in the main thread + \warning This method requires that the lock is held! A call to this method will either: - run a message requested to run synchronously on the main thread if there is one @@ -377,7 +378,6 @@ void QQmlThread::waitForNextMessage() #if QT_CONFIG(thread) Q_ASSERT(!isThisThread()); #endif - d->lock(); Q_ASSERT(d->m_mainThreadWaiting == false); d->m_mainThreadWaiting = true; @@ -397,7 +397,6 @@ void QQmlThread::waitForNextMessage() } d->m_mainThreadWaiting = false; - d->unlock(); } |