diff --git a/windec/kdecoration2/CMakeLists.txt b/windec/kdecoration2/CMakeLists.txt index b5b60ea9..7af41ee6 100644 --- a/windec/kdecoration2/CMakeLists.txt +++ b/windec/kdecoration2/CMakeLists.txt @@ -1,5 +1,6 @@ find_package(KDecoration2 REQUIRED) find_package(KF5 REQUIRED COMPONENTS CoreAddons ConfigWidgets) +find_package(Qt5 CONFIG REQUIRED COMPONENTS DBus ) set(breezedecoration_SRCS @@ -7,24 +8,34 @@ set(breezedecoration_SRCS breezebutton.cpp breezedecoration.cpp breezeimageprovider.cpp + config/breezeconfig.cpp + config/breezeconfigwidget.cpp ) kconfig_add_kcfg_files(breezedecoration_SRCS breezesettings.kcfgc) -add_library(breezedecoration MODULE ${breezedecoration_SRCS}) +set(breezedecoration_PART_FORMS + config/ui/breezeconfigurationui.ui +) + +ki18n_wrap_ui(breezedecoration_PART_FORMS_HEADERS ${breezedecoration_PART_FORMS}) + +add_library(breezedecoration MODULE + ${breezedecoration_SRCS} + ${breezedecoration_PART_FORMS_HEADERS}) target_link_libraries(breezedecoration PUBLIC Qt5::Core Qt5::Gui + Qt5::DBus PRIVATE KDecoration2::KDecoration KF5::ConfigCore KF5::CoreAddons KF5::ConfigWidgets KF5::GuiAddons + KF5::I18n ) install(TARGETS breezedecoration DESTINATION ${PLUGIN_INSTALL_DIR}/org.kde.kdecoration2) - -add_subdirectory(config) diff --git a/windec/kdecoration2/breeze.json b/windec/kdecoration2/breeze.json index 1abfb27f..26bc047f 100644 --- a/windec/kdecoration2/breeze.json +++ b/windec/kdecoration2/breeze.json @@ -7,6 +7,7 @@ "org.kde.kdecoration2" ], "org.kde.kdecoration2": { - "blur": false + "blur": false, + "kcmodule": true } } diff --git a/windec/kdecoration2/breezedecoration.cpp b/windec/kdecoration2/breezedecoration.cpp index ad45431e..2f64d465 100644 --- a/windec/kdecoration2/breezedecoration.cpp +++ b/windec/kdecoration2/breezedecoration.cpp @@ -21,6 +21,7 @@ #include "breezedecoration.h" #include "breeze.h" +#include "config/breezeconfig.h" #include "breezebutton.h" #include @@ -41,6 +42,7 @@ K_PLUGIN_FACTORY_WITH_JSON( "breeze.json", registerPlugin(); registerPlugin(QStringLiteral("button")); + registerPlugin(QStringLiteral("kcmodule")); ) namespace Breeze diff --git a/windec/kdecoration2/config/breezeconfig.cpp b/windec/kdecoration2/config/breezeconfig.cpp index ec5a953d..7bea87f9 100644 --- a/windec/kdecoration2/config/breezeconfig.cpp +++ b/windec/kdecoration2/config/breezeconfig.cpp @@ -28,7 +28,7 @@ ////////////////////////////////////////////////////////////////////////////// #include "breezeconfig.h" -#include "../breezesettings.h" +#include "breezesettings.h" #include #include @@ -49,12 +49,6 @@ extern "C" { return ( new Breeze::Config( parent ) ); } } -/** this is the new style/KF5 plugin declaration, used internally by KWin */ -K_PLUGIN_FACTORY_WITH_JSON( - BreezeConfigPlugin, - "config.json", - registerPlugin(QStringLiteral("kcmodule")); -) #include "breezeconfig.moc" namespace Breeze diff --git a/windec/kdecoration2/config/breezeconfigwidget.h b/windec/kdecoration2/config/breezeconfigwidget.h index b91d48ba..3d5ea65c 100644 --- a/windec/kdecoration2/config/breezeconfigwidget.h +++ b/windec/kdecoration2/config/breezeconfigwidget.h @@ -26,7 +26,7 @@ ////////////////////////////////////////////////////////////////////////////// #include "ui_breezeconfigurationui.h" -#include "../breezesettings.h" +#include "breezesettings.h" #include #include diff --git a/windec/kdecoration2/config/config.json b/windec/kdecoration2/config/config.json deleted file mode 100644 index 42c36eb3..00000000 --- a/windec/kdecoration2/config/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "X-KDE-PluginInfo-Name": "org.kde.breeze" -}