]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Install KCMs in dolphin/kcms namespace
authorAlexander Lohnau <alexander.lohnau@gmx.de>
Thu, 2 Sep 2021 18:11:11 +0000 (20:11 +0200)
committerAlexander Lohnau <alexander.lohnau@gmx.de>
Sat, 9 Oct 2021 12:14:27 +0000 (14:14 +0200)
This will allow consumers to load the plugin from this namespace
without KServiceTypeTrader being involved.

src/CMakeLists.txt
src/settings/kcm/kcmdolphingeneral.cpp
src/settings/kcm/kcmdolphingeneral.desktop
src/settings/kcm/kcmdolphinnavigation.cpp
src/settings/kcm/kcmdolphinnavigation.desktop
src/settings/kcm/kcmdolphinviewmodes.cpp
src/settings/kcm/kcmdolphinviewmodes.desktop

index 147f18c003696f1f056da7f9a706ffb8434d6b96..b97a5d7c0018a873b8c92352d1baf277eff19edc 100644 (file)
@@ -370,9 +370,12 @@ install(TARGETS dolphin ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
 
 if(NOT WIN32)
     # The settings are still accessible from the hamburger menu
-    add_library(kcm_dolphinviewmodes MODULE)
-    add_library(kcm_dolphinnavigation MODULE)
-    add_library(kcm_dolphingeneral MODULE)
+    add_library(kcm_dolphinviewmodes)
+    kcoreaddons_desktop_to_json(kcm_dolphinviewmodes settings/kcm/kcmdolphinviewmodes.desktop)
+    add_library(kcm_dolphinnavigation)
+    kcoreaddons_desktop_to_json(kcm_dolphinnavigation settings/kcm/kcmdolphinnavigation.desktop)
+    add_library(kcm_dolphingeneral)
+    kcoreaddons_desktop_to_json(kcm_dolphingeneral settings/kcm/kcmdolphingeneral.desktop)
 
     target_sources(kcm_dolphinviewmodes PRIVATE
         settings/kcm/kcmdolphinviewmodes.cpp
@@ -420,9 +423,9 @@ if(NOT WIN32)
     install( FILES settings/kcm/kcmdolphinnavigation.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} )
     install( FILES settings/kcm/kcmdolphingeneral.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} )
 
-    install(TARGETS kcm_dolphinviewmodes DESTINATION ${KDE_INSTALL_PLUGINDIR} )
-    install(TARGETS kcm_dolphinnavigation DESTINATION ${KDE_INSTALL_PLUGINDIR} )
-    install(TARGETS kcm_dolphingeneral DESTINATION ${KDE_INSTALL_PLUGINDIR} )
+    install(TARGETS kcm_dolphinviewmodes DESTINATION ${KDE_INSTALL_PLUGINDIR}/dolphin/kcms )
+    install(TARGETS kcm_dolphinnavigation DESTINATION ${KDE_INSTALL_PLUGINDIR}/dolphin/kcms )
+    install(TARGETS kcm_dolphingeneral DESTINATION ${KDE_INSTALL_PLUGINDIR}/dolphin/kcms )
 endif()
 
 if(NOT WIN32)
index fd0044325260233bf62cc771d901c20f79ac8a06..15419b23479a3a15519c7fb96f25e8f9e4a679e3 100644 (file)
@@ -17,7 +17,7 @@
 #include <QTabWidget>
 #include <QVBoxLayout>
 
-K_PLUGIN_FACTORY(KCMDolphinGeneralConfigFactory, registerPlugin<DolphinGeneralConfigModule>();)
+K_PLUGIN_CLASS_WITH_JSON(DolphinGeneralConfigModule, "kcmdolphingeneral.json")
 
 DolphinGeneralConfigModule::DolphinGeneralConfigModule(QWidget *parent, const QVariantList &args) :
     KCModule(parent, args),
index a1cb745bdbdf89b483f9c95f9d5233d17df38f81..2695d49ce5c93ce41cf737aa6ce4305b14d5316e 100644 (file)
@@ -111,7 +111,7 @@ Icon=system-file-manager
 Type=Service
 X-KDE-ServiceTypes=KCModule
 
-X-KDE-Library=kcm_dolphingeneral
+X-KDE-Library=dolphin/kcms/kcm_dolphingeneral
 X-DocPath=dolphin/configuring-dolphin.html#preferences-dialog
 # ctxt: Random file browsing settings.
 Name=General
index f749628ab6aeed17abcbbcb29a07f91b164aee12..c8a011ab7260d9c88dfa9f908c6a4c83d89f7835 100644 (file)
@@ -13,7 +13,7 @@
 
 #include <QVBoxLayout>
 
-K_PLUGIN_FACTORY(KCMDolphinNavigationConfigFactory, registerPlugin<DolphinNavigationConfigModule>();)
+K_PLUGIN_CLASS_WITH_JSON(DolphinNavigationConfigModule, "kcmdolphinnavigation.json")
 
 DolphinNavigationConfigModule::DolphinNavigationConfigModule(QWidget *parent, const QVariantList &args) :
     KCModule(parent, args),
index f532647c5eedbd464e88c3353316222d50f9edb9..161e5b6126c6891f757b278b053ea933186f9b42 100644 (file)
@@ -111,7 +111,7 @@ Icon=preferences-desktop-navigation
 Type=Service
 X-KDE-ServiceTypes=KCModule
 
-X-KDE-Library=kcm_dolphinnavigation
+X-KDE-Library=dolphin/kcms/kcm_dolphinnavigation
 X-DocPath=dolphin/configuring-dolphin.html#preferences-dialog-navigation
 Name=Navigation
 Name[ar]=التّنقّل
index 0c287ed220786858663fc7e925911be94a15ee3a..57698e0a9caf86a07583dba6479e56618aee9df5 100644 (file)
@@ -17,7 +17,7 @@
 #include <QTabWidget>
 #include <QVBoxLayout>
 
-K_PLUGIN_FACTORY(KCMDolphinViewModesConfigFactory, registerPlugin<DolphinViewModesConfigModule>();)
+K_PLUGIN_CLASS_WITH_JSON(DolphinViewModesConfigModule, "kcmdolphinviewmodes.json")
 
 DolphinViewModesConfigModule::DolphinViewModesConfigModule(QWidget *parent, const QVariantList &args) :
     KCModule(parent, args),
index 65b170dbc28c135bcb099bc2d0e291fa917749e7..1e8cc104303f9b479f42410751c4c14a38c9ba80 100644 (file)
@@ -109,7 +109,7 @@ Icon=preferences-desktop-icons
 Type=Service
 X-KDE-ServiceTypes=KCModule
 
-X-KDE-Library=kcm_dolphinviewmodes
+X-KDE-Library=dolphin/kcms/kcm_dolphinviewmodes
 X-DocPath=dolphin/configuring-dolphin.html#preferences-dialog-viewmodes
 Name=View Modes
 Name[ar]=أوضاع المنظور