diff --git a/src/kcms/decoration/CMakeLists.txt b/src/kcms/decoration/CMakeLists.txt index 9a70271eae..0eb1e2ffd3 100644 --- a/src/kcms/decoration/CMakeLists.txt +++ b/src/kcms/decoration/CMakeLists.txt @@ -20,8 +20,7 @@ kcmutils_generate_module_data( kconfig_add_kcfg_files(kcmkwindecoration_SRCS kwindecorationsettings.kcfgc GENERATE_MOC) -kcoreaddons_add_plugin(kcm_kwindecoration SOURCES ${kcmkwindecoration_SRCS} INSTALL_NAMESPACE "plasma/kcms/systemsettings") -kcmutils_generate_desktop_file(kcm_kwindecoration) +kcmutils_add_qml_kcm(kcm_kwindecoration SOURCES ${kcmkwindecoration_SRCS}) target_link_libraries(kcm_kwindecoration KDecoration2::KDecoration @@ -50,9 +49,6 @@ target_link_libraries(kwin-applywindowdecoration configure_file(window-decorations.knsrc.cmake ${CMAKE_CURRENT_BINARY_DIR}/window-decorations.knsrc) -# This desktop file is installed only for retrocompatibility with sycoca install(FILES kwindecorationsettings.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR}) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/window-decorations.knsrc DESTINATION ${KDE_INSTALL_KNSRCDIR}) install(TARGETS kwin-applywindowdecoration DESTINATION ${KDE_INSTALL_LIBEXECDIR}) - -kpackage_install_package(package kcm_kwindecoration kcms) diff --git a/src/kcms/decoration/package/contents/ui/ButtonGroup.qml b/src/kcms/decoration/ui/ButtonGroup.qml similarity index 100% rename from src/kcms/decoration/package/contents/ui/ButtonGroup.qml rename to src/kcms/decoration/ui/ButtonGroup.qml diff --git a/src/kcms/decoration/package/contents/ui/Buttons.qml b/src/kcms/decoration/ui/Buttons.qml similarity index 99% rename from src/kcms/decoration/package/contents/ui/Buttons.qml rename to src/kcms/decoration/ui/Buttons.qml index 4926b14108..0554377de9 100644 --- a/src/kcms/decoration/package/contents/ui/Buttons.qml +++ b/src/kcms/decoration/ui/Buttons.qml @@ -8,7 +8,7 @@ import QtQuick import QtQuick.Layouts import QtQuick.Controls as QQC2 -import org.kde.kcm as KCM +import org.kde.kcmutils as KCM import org.kde.kirigami 2.20 as Kirigami import org.kde.kwin.private.kdecoration as KDecoration diff --git a/src/kcms/decoration/package/contents/ui/ConfigureTitlebar.qml b/src/kcms/decoration/ui/ConfigureTitlebar.qml similarity index 98% rename from src/kcms/decoration/package/contents/ui/ConfigureTitlebar.qml rename to src/kcms/decoration/ui/ConfigureTitlebar.qml index 9f24cd8236..1ea30d52f3 100644 --- a/src/kcms/decoration/package/contents/ui/ConfigureTitlebar.qml +++ b/src/kcms/decoration/ui/ConfigureTitlebar.qml @@ -9,7 +9,7 @@ import QtQuick import QtQuick.Layouts import QtQuick.Controls as QQC2 -import org.kde.kcm as KCM +import org.kde.kcmutils as KCM import org.kde.kirigami 2.20 as Kirigami KCM.AbstractKCM { diff --git a/src/kcms/decoration/package/contents/ui/Themes.qml b/src/kcms/decoration/ui/Themes.qml similarity index 99% rename from src/kcms/decoration/package/contents/ui/Themes.qml rename to src/kcms/decoration/ui/Themes.qml index 77b1634965..c9d6a5b29b 100644 --- a/src/kcms/decoration/package/contents/ui/Themes.qml +++ b/src/kcms/decoration/ui/Themes.qml @@ -6,7 +6,7 @@ */ import QtQuick -import org.kde.kcm as KCM +import org.kde.kcmutils as KCM import org.kde.kirigami 2.20 as Kirigami import org.kde.kwin.private.kdecoration as KDecoration diff --git a/src/kcms/decoration/package/contents/ui/main.qml b/src/kcms/decoration/ui/main.qml similarity index 98% rename from src/kcms/decoration/package/contents/ui/main.qml rename to src/kcms/decoration/ui/main.qml index 5a83977208..73d2996e25 100644 --- a/src/kcms/decoration/package/contents/ui/main.qml +++ b/src/kcms/decoration/ui/main.qml @@ -9,7 +9,7 @@ import QtQuick import QtQuick.Layouts import QtQuick.Controls as QQC2 -import org.kde.kcm as KCM +import org.kde.kcmutils as KCM import org.kde.kirigami 2.20 as Kirigami import org.kde.newstuff as NewStuff diff --git a/src/kcms/desktop/CMakeLists.txt b/src/kcms/desktop/CMakeLists.txt index 1983e63c01..c521a7cdcf 100644 --- a/src/kcms/desktop/CMakeLists.txt +++ b/src/kcms/desktop/CMakeLists.txt @@ -13,8 +13,7 @@ set(kcm_kwin_virtualdesktops_PART_SRCS kconfig_add_kcfg_files(kcm_kwin_virtualdesktops_PART_SRCS virtualdesktopssettings.kcfgc GENERATE_MOC) -kcoreaddons_add_plugin(kcm_kwin_virtualdesktops SOURCES ${kcm_kwin_virtualdesktops_PART_SRCS} INSTALL_NAMESPACE "plasma/kcms/systemsettings") -kcmutils_generate_desktop_file(kcm_kwin_virtualdesktops) +kcmutils_add_qml_kcm(kcm_kwin_virtualdesktops SOURCES ${kcm_kwin_virtualdesktops_PART_SRCS}) target_link_libraries(kcm_kwin_virtualdesktops Qt::DBus @@ -27,7 +26,4 @@ target_link_libraries(kcm_kwin_virtualdesktops kcmkwincommon ) -########### install files ############### - install(FILES virtualdesktopssettings.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR}) -kpackage_install_package(package kcm_kwin_virtualdesktops kcms) diff --git a/src/kcms/desktop/package/contents/ui/main.qml b/src/kcms/desktop/ui/main.qml similarity index 99% rename from src/kcms/desktop/package/contents/ui/main.qml rename to src/kcms/desktop/ui/main.qml index d44150c610..37cdfd006b 100644 --- a/src/kcms/desktop/package/contents/ui/main.qml +++ b/src/kcms/desktop/ui/main.qml @@ -8,7 +8,7 @@ import QtQuick import QtQuick.Controls as QQC2 import QtQuick.Layouts -import org.kde.kcm as KCM +import org.kde.kcmutils as KCM import org.kde.kirigami 2.20 as Kirigami KCM.ScrollViewKCM { diff --git a/src/kcms/effects/CMakeLists.txt b/src/kcms/effects/CMakeLists.txt index de87f8a487..fae1eb3b05 100644 --- a/src/kcms/effects/CMakeLists.txt +++ b/src/kcms/effects/CMakeLists.txt @@ -9,8 +9,7 @@ set(kcm_kwin_effects_PART_SRCS desktopeffectsdata.cpp ) -kcoreaddons_add_plugin(kcm_kwin_effects SOURCES ${kcm_kwin_effects_PART_SRCS} INSTALL_NAMESPACE "plasma/kcms/systemsettings") -kcmutils_generate_desktop_file(kcm_kwin_effects) +kcmutils_add_qml_kcm(kcm_kwin_effects SOURCES ${kcm_kwin_effects_PART_SRCS}) target_link_libraries(kcm_kwin_effects Qt::DBus @@ -25,7 +24,4 @@ target_link_libraries(kcm_kwin_effects kcmkwincommon ) -########### install files ############### - install(FILES kwineffect.knsrc DESTINATION ${KDE_INSTALL_KNSRCDIR}) -kpackage_install_package(package kcm_kwin_effects kcms) diff --git a/src/kcms/effects/package/contents/ui/Effect.qml b/src/kcms/effects/ui/Effect.qml similarity index 99% rename from src/kcms/effects/package/contents/ui/Effect.qml rename to src/kcms/effects/ui/Effect.qml index 1dddf14e52..c973afb941 100644 --- a/src/kcms/effects/package/contents/ui/Effect.qml +++ b/src/kcms/effects/ui/Effect.qml @@ -11,7 +11,7 @@ import QtQuick.Controls as QQC2 import QtQuick.Layouts import org.kde.kirigami 2 as Kirigami -import org.kde.kcm as KCM +import org.kde.kcmutils as KCM Kirigami.SwipeListItem { id: listItem diff --git a/src/kcms/effects/package/contents/ui/Video.qml b/src/kcms/effects/ui/Video.qml similarity index 100% rename from src/kcms/effects/package/contents/ui/Video.qml rename to src/kcms/effects/ui/Video.qml diff --git a/src/kcms/effects/package/contents/ui/main.qml b/src/kcms/effects/ui/main.qml similarity index 99% rename from src/kcms/effects/package/contents/ui/main.qml rename to src/kcms/effects/ui/main.qml index 33d8703541..9816f5b427 100644 --- a/src/kcms/effects/package/contents/ui/main.qml +++ b/src/kcms/effects/ui/main.qml @@ -10,7 +10,7 @@ import QtQuick import QtQuick.Controls as QQC2 import QtQuick.Layouts -import org.kde.kcm +import org.kde.kcmutils import org.kde.config import org.kde.kirigami 2 as Kirigami import org.kde.newstuff as NewStuff diff --git a/src/kcms/rules/CMakeLists.txt b/src/kcms/rules/CMakeLists.txt index 3c84fd5596..46c3e608cd 100644 --- a/src/kcms/rules/CMakeLists.txt +++ b/src/kcms/rules/CMakeLists.txt @@ -41,8 +41,5 @@ if (KWIN_BUILD_ACTIVITIES) endif() target_link_libraries(KWinRulesObjects ${kcm_libs} ${kwin_kcm_rules_XCB_LIBS}) -kcoreaddons_add_plugin(kcm_kwinrules SOURCES kcmrules.cpp INSTALL_NAMESPACE "plasma/kcms/systemsettings") -kcmutils_generate_desktop_file(kcm_kwinrules) +kcmutils_add_qml_kcm(kcm_kwinrules SOURCES kcmrules.cpp) target_link_libraries(kcm_kwinrules KWinRulesObjects) - -kpackage_install_package(package kcm_kwinrules kcms) diff --git a/src/kcms/rules/package/contents/ui/FileDialogLoader.qml b/src/kcms/rules/ui/FileDialogLoader.qml similarity index 100% rename from src/kcms/rules/package/contents/ui/FileDialogLoader.qml rename to src/kcms/rules/ui/FileDialogLoader.qml diff --git a/src/kcms/rules/package/contents/ui/OptionsComboBox.qml b/src/kcms/rules/ui/OptionsComboBox.qml similarity index 100% rename from src/kcms/rules/package/contents/ui/OptionsComboBox.qml rename to src/kcms/rules/ui/OptionsComboBox.qml diff --git a/src/kcms/rules/package/contents/ui/RuleItemDelegate.qml b/src/kcms/rules/ui/RuleItemDelegate.qml similarity index 99% rename from src/kcms/rules/package/contents/ui/RuleItemDelegate.qml rename to src/kcms/rules/ui/RuleItemDelegate.qml index cc0c614705..87b6d357cf 100644 --- a/src/kcms/rules/package/contents/ui/RuleItemDelegate.qml +++ b/src/kcms/rules/ui/RuleItemDelegate.qml @@ -8,7 +8,7 @@ import QtQuick import QtQuick.Layouts import QtQuick.Controls as QQC2 import org.kde.kirigami 2.10 as Kirigami -import org.kde.kcm 1.6 as KCM +import org.kde.kcmutils as KCM Kirigami.AbstractListItem { id: ruleDelegate diff --git a/src/kcms/rules/package/contents/ui/RulesEditor.qml b/src/kcms/rules/ui/RulesEditor.qml similarity index 99% rename from src/kcms/rules/package/contents/ui/RulesEditor.qml rename to src/kcms/rules/ui/RulesEditor.qml index 947de10cb5..1a186f045a 100644 --- a/src/kcms/rules/package/contents/ui/RulesEditor.qml +++ b/src/kcms/rules/ui/RulesEditor.qml @@ -8,12 +8,12 @@ import QtQuick import QtQuick.Layouts import QtQuick.Controls as QQC2 import org.kde.kirigami 2.19 as Kirigami -import org.kde.kcm +import org.kde.kcmutils as KCM import org.kde.kitemmodels import org.kde.kcms.kwinrules -ScrollViewKCM { +KCM.ScrollViewKCM { id: rulesEditor title: kcm.rulesModel.description diff --git a/src/kcms/rules/package/contents/ui/ValueEditor.qml b/src/kcms/rules/ui/ValueEditor.qml similarity index 100% rename from src/kcms/rules/package/contents/ui/ValueEditor.qml rename to src/kcms/rules/ui/ValueEditor.qml diff --git a/src/kcms/rules/package/contents/ui/main.qml b/src/kcms/rules/ui/main.qml similarity index 97% rename from src/kcms/rules/package/contents/ui/main.qml rename to src/kcms/rules/ui/main.qml index a08fd15641..450b9ee771 100644 --- a/src/kcms/rules/package/contents/ui/main.qml +++ b/src/kcms/rules/ui/main.qml @@ -8,8 +8,7 @@ import QtQuick import QtQuick.Layouts import QtQuick.Controls as QQC2 import QtQml.Models -import org.kde.kcm as KCM -import org.kde.kcmutils as KCMUtils +import org.kde.kcmutils as KCM import org.kde.kirigami 2.12 as Kirigami KCM.ScrollViewKCM { @@ -19,8 +18,8 @@ KCM.ScrollViewKCM { implicitWidth: Kirigami.Units.gridUnit * 35 implicitHeight: Kirigami.Units.gridUnit * 25 - KCMUtils.ConfigModule.columnWidth: Kirigami.Units.gridUnit * 23 - KCMUtils.ConfigModule.buttons: KCMUtils.ConfigModule.Help | KCMUtils.ConfigModule.Apply + KCM.ConfigModule.columnWidth: Kirigami.Units.gridUnit * 23 + KCM.ConfigModule.buttons: KCM.ConfigModule.Help | KCM.ConfigModule.Apply property var selectedIndexes: [] diff --git a/src/kcms/scripts/CMakeLists.txt b/src/kcms/scripts/CMakeLists.txt index 6d2fe24bd5..bc48b73898 100644 --- a/src/kcms/scripts/CMakeLists.txt +++ b/src/kcms/scripts/CMakeLists.txt @@ -1,9 +1,8 @@ # KI18N Translation Domain for this library add_definitions(-DTRANSLATION_DOMAIN=\"kcm_kwin_scripts\") -kcoreaddons_add_plugin(kcm_kwin_scripts INSTALL_NAMESPACE plasma/kcms/systemsettings) +kcmutils_add_qml_kcm(kcm_kwin_scripts INSTALL_NAMESPACE plasma/kcms/systemsettings) -kcmutils_generate_desktop_file(kcm_kwin_scripts) target_sources(kcm_kwin_scripts PRIVATE module.cpp kwinscriptsdata.cpp @@ -19,5 +18,4 @@ target_link_libraries(kcm_kwin_scripts KF6::KCMUtilsQuick ) -kpackage_install_package(package kcm_kwin_scripts kcms) install(FILES kwinscripts.knsrc DESTINATION ${KDE_INSTALL_KNSRCDIR}) diff --git a/src/kcms/scripts/package/contents/ui/main.qml b/src/kcms/scripts/ui/main.qml similarity index 93% rename from src/kcms/scripts/package/contents/ui/main.qml rename to src/kcms/scripts/ui/main.qml index a32617b12d..396c2be025 100644 --- a/src/kcms/scripts/package/contents/ui/main.qml +++ b/src/kcms/scripts/ui/main.qml @@ -9,13 +9,12 @@ import QtQuick import QtQuick.Controls as QQC2 import QtQuick.Layouts -import org.kde.kcm import org.kde.config import org.kde.kirigami 2.10 as Kirigami import org.kde.newstuff as NewStuff -import org.kde.kcmutils as KCMUtils +import org.kde.kcmutils as KCM -ScrollViewKCM { +KCM.ScrollViewKCM { implicitWidth: Kirigami.Units.gridUnit * 22 implicitHeight: Kirigami.Units.gridUnit * 20 @@ -53,12 +52,12 @@ ScrollViewKCM { } } - view: KCMUtils.KPluginSelector { + view: KCMUtils.PluginSelector { id: selector sourceModel: kcm.model query: searchField.text - delegate: KCMUtils.KPluginDelegate { + delegate: KCM.PluginDelegate { onConfigTriggered: kcm.configure(model.config) additionalActions: [ Kirigami.Action { diff --git a/src/kcms/virtualkeyboard/CMakeLists.txt b/src/kcms/virtualkeyboard/CMakeLists.txt index c77586ee84..faa2221c6b 100644 --- a/src/kcms/virtualkeyboard/CMakeLists.txt +++ b/src/kcms/virtualkeyboard/CMakeLists.txt @@ -12,8 +12,7 @@ kcmutils_generate_module_data( ) kconfig_add_kcfg_files(kcm_virtualkeyboard_PART_SRCS virtualkeyboardsettings.kcfgc GENERATE_MOC) -kcoreaddons_add_plugin(kcm_virtualkeyboard SOURCES kcmvirtualkeyboard.cpp ${kcm_virtualkeyboard_PART_SRCS} INSTALL_NAMESPACE plasma/kcms/systemsettings) -kcmutils_generate_desktop_file(kcm_virtualkeyboard) +kcmutils_add_qml_kcm(kcm_virtualkeyboard SOURCES kcmvirtualkeyboard.cpp ${kcm_virtualkeyboard_PART_SRCS}) target_link_libraries(kcm_virtualkeyboard KF6::I18n @@ -21,5 +20,3 @@ target_link_libraries(kcm_virtualkeyboard KF6::Service KF6::KCMUtilsQuick ) - -kpackage_install_package(package kcm_virtualkeyboard kcms) diff --git a/src/kcms/virtualkeyboard/package/contents/ui/main.qml b/src/kcms/virtualkeyboard/ui/main.qml similarity index 96% rename from src/kcms/virtualkeyboard/package/contents/ui/main.qml rename to src/kcms/virtualkeyboard/ui/main.qml index 426af0d7b9..14fb20510c 100644 --- a/src/kcms/virtualkeyboard/package/contents/ui/main.qml +++ b/src/kcms/virtualkeyboard/ui/main.qml @@ -9,7 +9,7 @@ import QtQuick import QtQuick.Layouts import QtQuick.Controls as QQC2 import org.kde.kirigami 2.6 as Kirigami -import org.kde.kcm as KCM +import org.kde.kcmutils as KCM KCM.GridViewKCM { id: root diff --git a/src/kcms/xwayland/CMakeLists.txt b/src/kcms/xwayland/CMakeLists.txt index 385872fab7..46517b555b 100644 --- a/src/kcms/xwayland/CMakeLists.txt +++ b/src/kcms/xwayland/CMakeLists.txt @@ -12,8 +12,7 @@ kcmutils_generate_module_data( ) kconfig_add_kcfg_files(kcm_kwinxwayland_PART_SRCS kwinxwaylandsettings.kcfgc GENERATE_MOC) -kcoreaddons_add_plugin(kcm_kwinxwayland SOURCES kcmkwinxwayland.cpp ${kcm_kwinxwayland_PART_SRCS} INSTALL_NAMESPACE plasma/kcms/systemsettings) -kcmutils_generate_desktop_file(kcm_kwinxwayland) +kcmutils_add_qml_kcm(kcm_kwinxwayland SOURCES kcmkwinxwayland.cpp ${kcm_kwinxwayland_PART_SRCS}) target_link_libraries(kcm_kwinxwayland KF6::I18n @@ -21,4 +20,3 @@ target_link_libraries(kcm_kwinxwayland KF6::KCMUtilsQuick Wayland::Client ) -kpackage_install_package(package kcm_kwinxwayland kcms) diff --git a/src/kcms/xwayland/package/contents/ui/main.qml b/src/kcms/xwayland/ui/main.qml similarity index 98% rename from src/kcms/xwayland/package/contents/ui/main.qml rename to src/kcms/xwayland/ui/main.qml index f09d408dda..95540a9811 100644 --- a/src/kcms/xwayland/package/contents/ui/main.qml +++ b/src/kcms/xwayland/ui/main.qml @@ -9,7 +9,7 @@ import QtQuick import QtQuick.Layouts import QtQuick.Controls as QQC2 import org.kde.kirigami 2.6 as Kirigami -import org.kde.kcm as KCM +import org.kde.kcmutils as KCM import org.kde.kwin.kwinxwaylandsettings import org.kde.kquickcontrols