diff options
Diffstat (limited to 'vcl/qt5')
-rw-r--r-- | vcl/qt5/Qt5Instance.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/qt5/Qt5Instance.cxx b/vcl/qt5/Qt5Instance.cxx index cf45dacf835a..c365afbe8ec2 100644 --- a/vcl/qt5/Qt5Instance.cxx +++ b/vcl/qt5/Qt5Instance.cxx @@ -140,6 +140,7 @@ std::shared_ptr<SalBitmap> Qt5Instance::CreateSalBitmap() bool Qt5Instance::ImplYield(bool bWait, bool bHandleAllCurrentEvents) { + // Re-aquire the guard for user events when called via Q_EMIT ImplYieldSignal SolarMutexGuard aGuard; bool wasEvent = DispatchUserEvents(bHandleAllCurrentEvents); if (!bHandleAllCurrentEvents && wasEvent) @@ -149,6 +150,7 @@ bool Qt5Instance::ImplYield(bool bWait, bool bHandleAllCurrentEvents) * Quoting the Qt docs: [QAbstractEventDispatcher::processEvents] processes * pending events that match flags until there are no more events to process. */ + SolarMutexReleaser aReleaser; QAbstractEventDispatcher* dispatcher = QAbstractEventDispatcher::instance(qApp->thread()); if (bWait && !wasEvent) wasEvent = dispatcher->processEvents(QEventLoop::WaitForMoreEvents); @@ -162,8 +164,6 @@ bool Qt5Instance::DoYield(bool bWait, bool bHandleAllCurrentEvents) bool bWasEvent = false; if (qApp->thread() == QThread::currentThread()) { - // release YieldMutex (and re-acquire in ImplYield) - SolarMutexReleaser aReleaser; bWasEvent = ImplYield(bWait, bHandleAllCurrentEvents); if (bWasEvent) m_aWaitingYieldCond.set(); |