[Libreoffice-commits] core.git: vcl/qt5
Jan-Marek Glogowski (via logerrit)
logerrit at kemper.freedesktop.org
Sat Feb 22 00:15:55 UTC 2020
vcl/qt5/Qt5Instance.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit c6fb366e05370af553af2130b370909ed4495cff
Author: Jan-Marek Glogowski <jan-marek.glogowski at extern.cib.de>
AuthorDate: Fri Feb 21 00:22:37 2020 +0100
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Sat Feb 22 01:15:20 2020 +0100
tdf#130499 Qt5 no qApp == main thread
If there is no QApplication, we can ignore the GUI thread.
Change-Id: I0d2faf4799d493ad0b6074b40242c443d4bc43dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89241
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>
diff --git a/vcl/qt5/Qt5Instance.cxx b/vcl/qt5/Qt5Instance.cxx
index 1a0f10864e41..855f32d249af 100644
--- a/vcl/qt5/Qt5Instance.cxx
+++ b/vcl/qt5/Qt5Instance.cxx
@@ -400,7 +400,10 @@ void Qt5Instance::AddToRecentDocumentList(const OUString&, const OUString&, cons
OpenGLContext* Qt5Instance::CreateOpenGLContext() { return new Qt5OpenGLContext; }
-bool Qt5Instance::IsMainThread() const { return qApp->thread() == QThread::currentThread(); }
+bool Qt5Instance::IsMainThread() const
+{
+ return !qApp || (qApp->thread() == QThread::currentThread());
+}
void Qt5Instance::TriggerUserEventProcessing()
{
More information about the Libreoffice-commits
mailing list