diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-02-02 16:21:43 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-02-03 17:16:12 +0100 |
commit | f6180e3e8725687605027815b4e878dc83b300b0 (patch) | |
tree | d6045f278e894b9a2d98f6db295fa6afa885750b /shell/source | |
parent | 8f67e2633af1386fbfe15b53b4e309dcda988a6f (diff) |
rhbz#2047319 drop the SolarMutex before QApplication::init()
https://invent.kde.org/qt/qt/qtwayland/-/merge_requests/24#note_383915
reproducible with with qt5-qtwayland-5.15.2-17.fc35.x86_64 and
export OOO_FORCE_DESKTOP=plasma5
export SAL_USE_VCLPLUGIN=gtk3
Change-Id: Icdf6b8709865c723c266e6400169b33639a1b0e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129373
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'shell/source')
-rw-r--r-- | shell/source/backends/kf5be/kf5backend.cxx | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/shell/source/backends/kf5be/kf5backend.cxx b/shell/source/backends/kf5be/kf5backend.cxx index e9e10e60fd27..2b41414c54cd 100644 --- a/shell/source/backends/kf5be/kf5backend.cxx +++ b/shell/source/backends/kf5be/kf5backend.cxx @@ -41,6 +41,7 @@ #include <rtl/ustring.hxx> #include <sal/types.h> #include <uno/current_context.hxx> +#include <vcl/svapp.hxx> #include <osl/process.h> #include <osl/thread.h> @@ -172,14 +173,20 @@ void initQApp(std::map<OUString, css::beans::Optional<css::uno::Any>>& rSettings unsetenv("SESSION_MANAGER"); } - std::unique_ptr<QApplication> app(new QApplication(nFakeArgc, pFakeArgv)); - QObject::connect(app.get(), &QObject::destroyed, app.get(), [nFakeArgc, pFakeArgv]() { - for (int i = 0; i < nFakeArgc; ++i) - free(pFakeArgv[i]); - delete[] pFakeArgv; - }); - - readKDESettings(rSettings); + { + // rhbz#2047319 drop the SolarMutex during the execution of QApplication::init() + // https://invent.kde.org/qt/qt/qtwayland/-/merge_requests/24#note_383915 + SolarMutexReleaser aReleaser; // rhbz#2047319 drop the SolarMutex during the execution + + std::unique_ptr<QApplication> app(new QApplication(nFakeArgc, pFakeArgv)); + QObject::connect(app.get(), &QObject::destroyed, app.get(), [nFakeArgc, pFakeArgv]() { + for (int i = 0; i < nFakeArgc; ++i) + free(pFakeArgv[i]); + delete[] pFakeArgv; + }); + + readKDESettings(rSettings); + } if (session_manager != nullptr) { |