diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2018-07-23 11:58:07 +0000 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2018-07-23 17:12:40 +0200 |
commit | bded890a44cc3cc7ce07113565ce80469697f73f (patch) | |
tree | 3eface278e4a213c024d085a6c2a71a296561e16 /vcl/qt5 | |
parent | deafd385566a5e65d0fe33780db2fcd3825f369e (diff) |
Qt5 just release the SolarMutex for Qt events
Just like the other backends, just release the SolarMutex when
processing Qt events and keep it for user events.
Change-Id: I0c4a7149f1541607b546a99e51e790836bc9b2f9
Reviewed-on: https://gerrit.libreoffice.org/57844
Tested-by: Jenkins
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
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(); |