Commit 8e3e1aa3 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Port KCMs to new plasma install namespaces, embed json metadata

Because we have desktop files for the plugins, I have not done the desktop to json
conversion as part of that commit. Once the plugin system stuff is figured out, the
changes should be done in one go, then we can copy the translations and avoid extra work for the translators.

Task https://phabricator.kde.org/T14517
parent 2ebe655d
Pipeline #193375 passed with stage
in 2 minutes and 7 seconds
......@@ -12,12 +12,11 @@ ki18n_wrap_ui(kcm_powerdevil_activities_SRCS
kconfig_add_kcfg_files(kcm_powerdevil_activities_SRCS ../../PowerDevilSettings.kcfgc)
add_library(kcm_powerdevilactivitiesconfig MODULE ${kcm_powerdevil_activities_SRCS})
kcoreaddons_add_plugin(kcm_powerdevilactivitiesconfig SOURCES ${kcm_powerdevil_activities_SRCS} INSTALL_NAMESPACE "plasma/kcms/systemsettings_qwidgets")
kcoreaddons_desktop_to_json(kcm_powerdevilactivitiesconfig kcm_powerdevilactivitiesconfig.desktop)
target_link_libraries(kcm_powerdevilactivitiesconfig
KF5::Activities
powerdevilconfigcommonprivate
)
install(TARGETS kcm_powerdevilactivitiesconfig DESTINATION ${KDE_INSTALL_PLUGINDIR} )
install( FILES powerdevilactivitiesconfig.desktop DESTINATION ${KDE_INSTALL_KSERVICESDIR} )
install(FILES kcm_powerdevilactivitiesconfig.desktop DESTINATION ${KDE_INSTALL_APPDIR})
......@@ -46,9 +46,7 @@
#include <KSharedConfig>
#include <KLocalizedString>
K_PLUGIN_FACTORY(PowerDevilActivitiesKCMFactory,
registerPlugin<ActivityPage>();
)
K_PLUGIN_CLASS_WITH_JSON(ActivityPage, "kcm_powerdevilactivitiesconfig.json")
ActivityPage::ActivityPage(QWidget *parent, const QVariantList &args)
: KCModule(parent, args)
......
[Desktop Entry]
Icon=preferences-desktop-activities
Type=Service
Type=Application
NoDisplay=true
Exec=systemsettings kcm_powerdevilactivitiesconfig
X-KDE-ServiceTypes=KCModule
X-DocPath=kcontrol/powerdevil/index.html#activity-setting
X-KDE-Library=kcm_powerdevilactivitiesconfig
X-KDE-ParentApp=kcontrol
X-KDE-System-Settings-Parent-Category=power-management
X-KDE-Weight=50
......
......@@ -9,7 +9,8 @@ ki18n_wrap_ui(kcm_powerdevil_global_SRCS
kconfig_add_kcfg_files(kcm_powerdevil_global_SRCS ../../PowerDevilSettings.kcfgc)
add_library(kcm_powerdevilglobalconfig MODULE ${kcm_powerdevil_global_SRCS})
kcoreaddons_add_plugin(kcm_powerdevilglobalconfig SOURCES ${kcm_powerdevil_global_SRCS} INSTALL_NAMESPACE "plasma/kcms/systemsettings_qwidgets")
kcoreaddons_desktop_to_json(kcm_powerdevilglobalconfig kcm_powerdevilglobalconfig.desktop)
target_link_libraries(kcm_powerdevilglobalconfig
KF5::AuthCore
......@@ -19,5 +20,4 @@ target_link_libraries(kcm_powerdevilglobalconfig
powerdevilconfigcommonprivate
)
install(TARGETS kcm_powerdevilglobalconfig DESTINATION ${KDE_INSTALL_PLUGINDIR} )
install( FILES powerdevilglobalconfig.desktop DESTINATION ${KDE_INSTALL_KSERVICESDIR} )
install(FILES kcm_powerdevilglobalconfig.desktop DESTINATION ${KDE_INSTALL_APPDIR})
......@@ -52,9 +52,7 @@
#include <KAuthExecuteJob>
#endif
K_PLUGIN_FACTORY(PowerDevilGeneralKCMFactory,
registerPlugin<GeneralPage>();
)
K_PLUGIN_CLASS_WITH_JSON(GeneralPage, "kcm_powerdevilglobalconfig.json")
GeneralPage::GeneralPage(QWidget *parent, const QVariantList &args)
: KCModule(parent, args)
......
[Desktop Entry]
Icon=preferences-other
Type=Service
Type=Application
NoDiplay=true
Exec=systemsettings kcm_powerdevilglobalconfig
X-KDE-ServiceTypes=KCModule
X-DocPath=kcontrol/powerdevil/index.html#advanced-settings
X-KDE-Library=kcm_powerdevilglobalconfig
X-KDE-ParentApp=kcontrol
X-KDE-System-Settings-Parent-Category=power-management
X-KDE-Weight=99
......
......@@ -11,7 +11,8 @@ ki18n_wrap_ui(kcm_powerdevil_profiles_SRCS
kconfig_add_kcfg_files(kcm_powerdevil_profiles_SRCS ../../PowerDevilSettings.kcfgc)
add_library(kcm_powerdevilprofilesconfig MODULE ${kcm_powerdevil_profiles_SRCS})
kcoreaddons_add_plugin(kcm_powerdevilprofilesconfig SOURCES ${kcm_powerdevil_profiles_SRCS} INSTALL_NAMESPACE "plasma/kcms/systemsettings_qwidgets")
kcoreaddons_desktop_to_json(kcm_powerdevilprofilesconfig kcm_powerdevilprofilesconfig.desktop)
target_link_libraries(kcm_powerdevilprofilesconfig
KF5::KIOWidgets
......@@ -22,5 +23,4 @@ target_link_libraries(kcm_powerdevilprofilesconfig
powerdevilconfigcommonprivate
)
install(TARGETS kcm_powerdevilprofilesconfig DESTINATION ${KDE_INSTALL_PLUGINDIR} )
install( FILES powerdevilprofilesconfig.desktop DESTINATION ${KDE_INSTALL_KSERVICESDIR} )
install(FILES kcm_powerdevilprofilesconfig.desktop DESTINATION ${KDE_INSTALL_APPDIR})
......@@ -51,9 +51,7 @@
#include <Solid/Battery>
#include <Solid/Device>
K_PLUGIN_FACTORY(PowerDevilProfilesKCMFactory,
registerPlugin<EditPage>();
)
K_PLUGIN_CLASS_WITH_JSON(EditPage, "kcm_powerdevilprofilesconfig.json")
EditPage::EditPage(QWidget *parent, const QVariantList &args)
: KCModule(parent, args)
......
[Desktop Entry]
Icon=preferences-system-power-management
Type=Service
Type=Application
NoDisplay=true
Exec=systemsettings kcm_powerdevilprofilesconfig
X-KDE-ServiceTypes=KCModule
X-DocPath=kcontrol/powerdevil/index.html
X-KDE-Library=kcm_powerdevilprofilesconfig
X-KDE-ParentApp=kcontrol
X-KDE-System-Settings-Parent-Category=power-management
X-KDE-Weight=3
......
Supports Markdown
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