diff --git a/shell/Library_kf5be.mk b/shell/Library_kf5be.mk index 61262c567516..26ed1b35dd22 100644 --- a/shell/Library_kf5be.mk +++ b/shell/Library_kf5be.mk @@ -20,6 +20,7 @@ $(eval $(call gb_Library_use_libraries,kf5be1,\ cppu \ cppuhelper \ sal \ + vcl \ )) $(eval $(call gb_Library_set_componentfile,kf5be1,shell/source/backends/kf5be/kf5be1,services)) 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 #include #include +#include #include #include @@ -172,14 +173,20 @@ void initQApp(std::map>& rSettings unsetenv("SESSION_MANAGER"); } - std::unique_ptr 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; - }); + { + // 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 - readKDESettings(rSettings); + std::unique_ptr 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) {