[Libreoffice-commits] core.git: vcl/qt5
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Jul 23 10:40:26 UTC 2018
vcl/qt5/Qt5Instance.cxx | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit bb035edcadf0d7e77e45b421ac6c06c1f3183465
Author: Katarina Behrens <Katarina.Behrens at cib.de>
AuthorDate: Fri Jul 20 16:04:48 2018 +0200
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Mon Jul 23 12:40:06 2018 +0200
Avoid deadlock in case of events not driven by the user
e.g. progress bar updates. Release and re-acquire SolarMutex
Change-Id: Ie4e12fed7b2b8ee9bcb163334d82e466025cb7fa
Reviewed-on: https://gerrit.libreoffice.org/57780
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/vcl/qt5/Qt5Instance.cxx b/vcl/qt5/Qt5Instance.cxx
index fc06d47d317b..cf45dacf835a 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)
{
+ SolarMutexGuard aGuard;
bool wasEvent = DispatchUserEvents(bHandleAllCurrentEvents);
if (!bHandleAllCurrentEvents && wasEvent)
return true;
@@ -161,6 +162,8 @@ 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();
More information about the Libreoffice-commits
mailing list