summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2018-09-19 11:48:36 +0000
committerJan-Marek Glogowski <glogow@fbihome.de>2018-09-20 13:45:52 +0200
commitf19caba47949ebe918f3b76e49a398192b2da365 (patch)
tree865eb45c481bfa7ebd34b3fc6c69a9128d0edb18 /shell
parent2369b23256df2e910722800f14aec4eba41b6f5d (diff)
Don't try to load VCL conflicting config backends
Since we can't load Qt4 and Qt5 based libraries in one process prevent loading the conflicting config backends based on the VCL backend. Also removes the reference to the long gone KDE3 backend. Change-Id: I7a9bc449ebf825b47882f8bd207496a2a9597608 Reviewed-on: https://gerrit.libreoffice.org/60764 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'shell')
-rw-r--r--shell/Library_desktopbe.mk1
-rw-r--r--shell/source/backends/desktopbe/desktopbackend.cxx23
2 files changed, 13 insertions, 11 deletions
diff --git a/shell/Library_desktopbe.mk b/shell/Library_desktopbe.mk
index 7dc32ba47733..f782a0a146e3 100644
--- a/shell/Library_desktopbe.mk
+++ b/shell/Library_desktopbe.mk
@@ -17,6 +17,7 @@ $(eval $(call gb_Library_use_libraries,desktopbe1,\
cppu \
cppuhelper \
sal \
+ vcl \
))
$(eval $(call gb_Library_set_componentfile,desktopbe1,shell/source/backends/desktopbe/desktopbe1))
diff --git a/shell/source/backends/desktopbe/desktopbackend.cxx b/shell/source/backends/desktopbe/desktopbackend.cxx
index b5d77eed9f49..8cfaefc9f9c9 100644
--- a/shell/source/backends/desktopbe/desktopbackend.cxx
+++ b/shell/source/backends/desktopbe/desktopbackend.cxx
@@ -52,6 +52,7 @@
#include <rtl/ustring.hxx>
#include <sal/types.h>
#include <uno/current_context.hxx>
+#include <vcl/svapp.hxx>
namespace {
@@ -295,20 +296,20 @@ css::uno::Reference< css::uno::XInterface > createInstance(
current->getValueByName("system.desktop-environment") >>= desktop;
}
+ OUString sTK = Application::GetToolkitName();
+
// Fall back to the default if the specific backend is not available:
css::uno::Reference< css::uno::XInterface > backend;
- if ( desktop == "KDE" ) {
- backend = createBackend(
- context,
- "com.sun.star.configuration.backend.KDEBackend");
- } else if ( desktop == "KDE4" ) {
- backend = createBackend(
- context,
- "com.sun.star.configuration.backend.KDE4Backend");
+ if ( desktop == "KDE4" ) {
+ if (!(sTK.startsWith("qt5") || sTK.startsWith("kde5")))
+ backend = createBackend(
+ context,
+ "com.sun.star.configuration.backend.KDE4Backend");
} else if ( desktop == "KDE5" ) {
- backend = createBackend(
- context,
- "com.sun.star.configuration.backend.KDE5Backend");
+ if (!(sTK.startsWith("kde4")))
+ backend = createBackend(
+ context,
+ "com.sun.star.configuration.backend.KDE5Backend");
}
return backend.is()
? backend : static_cast< cppu::OWeakObject * >(new Default);