vcl/qt5/Qt5Instance.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit bded890a44cc3cc7ce07113565ce80469697f73f Author: Jan-Marek Glogowski <[email protected]> AuthorDate: Mon Jul 23 11:58:07 2018 +0000 Commit: Jan-Marek Glogowski <[email protected]> CommitDate: Mon Jul 23 17:12:40 2018 +0200 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 <[email protected]> Reviewed-by: Jan-Marek Glogowski <[email protected]> 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(); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
