1 diff --git a/kded/gtkconfig.cpp b/kded/gtkconfig.cpp
2 index 5303636..199c4d5 100644
3 --- a/kded/gtkconfig.cpp
4 +++ b/kded/gtkconfig.cpp
5 @@ -41,6 +41,16 @@ GtkConfig::GtkConfig(QObject *parent, const QVariantList&) :
6 kdeglobalsConfigWatcher(KConfigWatcher::create(KSharedConfig::openConfig(QStringLiteral("kdeglobals")))),
7 kwinConfigWatcher(KConfigWatcher::create(KSharedConfig::openConfig(QStringLiteral("kwinrc"))))
9 + // Add GSETTINGS_SCHEMAS_PATH to the front of XDG_DATA_DIRS.
10 + // Normally this would be done by wrapGAppsHook, but this plugin
11 + // (shared object) cannot be wrapped.
12 + QByteArray xdgdata = qgetenv("XDG_DATA_DIRS");
13 + if (!xdgdata.isEmpty()) {
14 + xdgdata.push_front(":");
16 + xdgdata.push_front(QByteArray(GSETTINGS_SCHEMAS_PATH));
17 + qputenv("XDG_DATA_DIRS", xdgdata);
19 QDBusConnection dbus = QDBusConnection::sessionBus();
20 dbus.registerService(QStringLiteral("org.kde.GtkConfig"));
21 dbus.registerObject(QStringLiteral("/GtkConfig"), this, QDBusConnection::ExportScriptableSlots);