Kaydet (Commit) f19caba4 authored tarafından Jan-Marek Glogowski's avatar Jan-Marek Glogowski

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: 's avatarJan-Marek Glogowski <glogow@fbihome.de>
üst 2369b232
......@@ -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))
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment