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

Port away from deprecated KCM create_ functions

parent 38867d43
Pipeline #61322 canceled with stage
......@@ -60,31 +60,9 @@ install(TARGETS
)
########### next target ###############
add_library(korganizer_kcm_static STATIC widgets/kitemiconcheckcombo.cpp prefs/kprefsdialog.cpp ${korganizer_common_SRCS})
set(kcm_korganizer_PART_SRCS
kcmdesignerfields.cpp
prefs/koprefsuserfeedback.cpp
prefs/koprefsdesignerfields.cpp
prefs/koprefsdialogplugins.cpp
prefs/koprefsdialoggroupwarescheduling.cpp
korganizer_debug.cpp
prefs/koprefsdialoggroupscheduling.cpp
prefs/koprefsdialogcolorsandfonts.cpp
prefs/koprefsdialogmain.cpp
prefs/koprefsdialogtime.cpp
prefs/koprefsdialogviews.cpp
prefs/kprefsdialog.cpp
widgets/kitemiconcheckcombo.cpp
)
add_library(kcm_korganizer MODULE ${kcm_korganizer_PART_SRCS})
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(kcm_korganizer PROPERTIES UNITY_BUILD ON)
endif()
generate_export_header(kcm_korganizer BASE_NAME kcm_korganizer)
target_link_libraries(kcm_korganizer
target_link_libraries(korganizer_kcm_static
KF5::AkonadiCalendar
KF5::CalendarSupport
KF5::EventViews
......@@ -98,13 +76,52 @@ target_link_libraries(kcm_korganizer
KF5::PimCommon
KF5::AkonadiWidgets
KF5::WindowSystem
${korganizer_userfeedback_LIB}
)
install(TARGETS
kcm_korganizer
DESTINATION ${KDE_INSTALL_PLUGINDIR}
)
add_library(korganizer_configcolorsandfonts MODULE prefs/koprefsdialogcolorsandfonts.cpp)
kcoreaddons_desktop_to_json(korganizer_kcm_static "kcmconfigs/korganizer_configcolorsandfonts.desktop" SERVICE_TYPES kcmodule.desktop)
target_link_libraries(korganizer_configcolorsandfonts korganizer_kcm_static)
install(TARGETS korganizer_configcolorsandfonts DESTINATION ${KDE_INSTALL_PLUGINDIR})
add_library(korganizer_configdesignerfields MODULE prefs/koprefsdesignerfields.cpp kcmdesignerfields.cpp)
kcoreaddons_desktop_to_json(korganizer_kcm_static "kcmconfigs/korganizer_configdesignerfields.desktop" SERVICE_TYPES kcmodule.desktop)
target_link_libraries(korganizer_configdesignerfields korganizer_kcm_static)
install(TARGETS korganizer_configdesignerfields DESTINATION ${KDE_INSTALL_PLUGINDIR})
add_library(korganizer_configfreebusy MODULE prefs/koprefsdialoggroupwarescheduling.cpp)
kcoreaddons_desktop_to_json(korganizer_kcm_static "kcmconfigs/korganizer_configfreebusy.desktop" SERVICE_TYPES kcmodule.desktop)
target_link_libraries(korganizer_configfreebusy korganizer_kcm_static)
install(TARGETS korganizer_configfreebusy DESTINATION ${KDE_INSTALL_PLUGINDIR})
add_library(korganizer_configgroupscheduling MODULE prefs/koprefsdialogmain.cpp)
kcoreaddons_desktop_to_json(korganizer_kcm_static "kcmconfigs/korganizer_configgroupscheduling.desktop" SERVICE_TYPES kcmodule.desktop)
target_link_libraries(korganizer_configgroupscheduling korganizer_kcm_static)
install(TARGETS korganizer_configgroupscheduling DESTINATION ${KDE_INSTALL_PLUGINDIR})
add_library(korganizer_configmain MODULE prefs/koprefsdialoggroupscheduling.cpp)
kcoreaddons_desktop_to_json(korganizer_kcm_static "kcmconfigs/korganizer_configmain.desktop" SERVICE_TYPES kcmodule.desktop)
target_link_libraries(korganizer_configmain korganizer_kcm_static)
install(TARGETS korganizer_configmain DESTINATION ${KDE_INSTALL_PLUGINDIR})
add_library(korganizer_configplugins MODULE prefs/koprefsdialogplugins.cpp)
kcoreaddons_desktop_to_json(korganizer_kcm_static "kcmconfigs/korganizer_configplugins.desktop" SERVICE_TYPES kcmodule.desktop)
target_link_libraries(korganizer_configplugins korganizer_kcm_static)
install(TARGETS korganizer_configplugins DESTINATION ${KDE_INSTALL_PLUGINDIR})
add_library(korganizer_configtime MODULE prefs/koprefsdialogtime.cpp)
kcoreaddons_desktop_to_json(korganizer_kcm_static "kcmconfigs/korganizer_configtime.desktop" SERVICE_TYPES kcmodule.desktop)
target_link_libraries(korganizer_configtime korganizer_kcm_static)
install(TARGETS korganizer_configtime DESTINATION ${KDE_INSTALL_PLUGINDIR})
add_library(korganizer_configviews MODULE prefs/koprefsdialogviews.cpp)
kcoreaddons_desktop_to_json(korganizer_kcm_static "kcmconfigs/korganizer_configviews.desktop" SERVICE_TYPES kcmodule.desktop)
target_link_libraries(korganizer_configviews korganizer_kcm_static)
install(TARGETS korganizer_configviews DESTINATION ${KDE_INSTALL_PLUGINDIR})
add_library(korganizer_userfeedback MODULE prefs/koprefsuserfeedback.cpp)
kcoreaddons_desktop_to_json(korganizer_kcm_static "kcmconfigs/korganizer_userfeedback.desktop" SERVICE_TYPES kcmodule.desktop)
target_link_libraries(korganizer_userfeedback korganizer_kcm_static ${korganizer_userfeedback_LIB})
install(TARGETS korganizer_userfeedback DESTINATION ${KDE_INSTALL_PLUGINDIR})
########### next target ###############
......
......@@ -4,7 +4,7 @@ Type=Service
X-KDE-ServiceTypes=KCModule
X-KDE-ModuleType=Library
X-KDE-Library=kcm_korganizer
X-KDE-Library=korganizer_configcolorsandfonts
X-KDE-FactoryName=korganizerconfigcolorsandfonts
X-KDE-HasReadOnlyMode=false
X-KDE-ParentApp=korganizer
......
......@@ -5,7 +5,7 @@ X-KDE-ServiceTypes=KCModule
X-DocPath=korganizer/preferences.html
X-KDE-ModuleType=Library
X-KDE-Library=kcm_korganizer
X-KDE-Library=korganizer_configdesignerfields
X-KDE-FactoryName=korgdesignerfields
X-KDE-ParentApp=kcontactmanager
X-KDE-ParentComponents=korganizer,kontact_korganizerplugin
......
......@@ -4,7 +4,7 @@ Type=Service
X-KDE-ServiceTypes=KCModule
X-KDE-ModuleType=Library
X-KDE-Library=kcm_korganizer
X-KDE-Library=korganizer_configfreebusy
X-KDE-FactoryName=korganizerconfigfreebusy
X-KDE-HasReadOnlyMode=false
X-KDE-ParentApp=korganizer
......
......@@ -4,7 +4,7 @@ Type=Service
X-KDE-ServiceTypes=KCModule
X-KDE-ModuleType=Library
X-KDE-Library=kcm_korganizer
X-KDE-Library=korganizer_configgroupscheduling
X-KDE-FactoryName=korganizerconfiggroupscheduling
X-KDE-HasReadOnlyMode=false
X-KDE-ParentApp=korganizer
......
......@@ -4,7 +4,7 @@ Type=Service
X-KDE-ServiceTypes=KCModule
X-KDE-ModuleType=Library
X-KDE-Library=kcm_korganizer
X-KDE-Library=korganizer_configmain
X-KDE-FactoryName=korganizerconfigmain
X-KDE-HasReadOnlyMode=false
X-KDE-ParentApp=korganizer
......
......@@ -4,7 +4,7 @@ Type=Service
X-KDE-ServiceTypes=KCModule
X-KDE-ModuleType=Library
X-KDE-Library=kcm_korganizer
X-KDE-Library=korganizer_configplugins
X-KDE-FactoryName=korganizerconfigplugins
X-KDE-HasReadOnlyMode=false
X-KDE-ParentApp=korganizer
......
......@@ -4,7 +4,7 @@ Type=Service
X-KDE-ServiceTypes=KCModule
X-KDE-ModuleType=Library
X-KDE-Library=kcm_korganizer
X-KDE-Library=korganizer_configtime
X-KDE-FactoryName=korganizerconfigtime
X-KDE-HasReadOnlyMode=false
X-KDE-ParentApp=korganizer
......
......@@ -4,7 +4,7 @@ Type=Service
X-KDE-ServiceTypes=KCModule
X-KDE-ModuleType=Library
X-KDE-Library=kcm_korganizer
X-KDE-Library=korganizer_configviews
X-KDE-FactoryName=korganizerconfigviews
X-KDE-HasReadOnlyMode=false
X-KDE-ParentApp=korganizer
......
......@@ -4,7 +4,7 @@ Type=Service
X-KDE-ServiceTypes=KCModule
X-KDE-ModuleType=Library
X-KDE-Library=kcm_korganizer
X-KDE-Library=korganizer_userfeedback
X-KDE-FactoryName=korguserfeeback
X-KDE-HasReadOnlyMode=false
X-KDE-ParentApp=korganizer
......
......@@ -48,7 +48,7 @@ set(kcm_apptsummary_PART_SRCS kcmapptsummary.cpp)
ki18n_wrap_ui(kcm_apptsummary_PART_SRCS apptsummaryconfig_base.ui)
add_library(kcm_apptsummary MODULE ${kcm_apptsummary_PART_SRCS})
kcoreaddons_desktop_to_json(kcm_apptsummary "kcmapptsummary.desktop" SERVICE_TYPES kcmodule.desktop)
target_link_libraries(kcm_apptsummary KF5::KCMUtils KF5::I18n)
########### next target ###############
......@@ -58,7 +58,7 @@ set(kcm_todosummary_PART_SRCS kcmtodosummary.cpp)
ki18n_wrap_ui(kcm_todosummary_PART_SRCS todosummaryconfig_base.ui)
add_library(kcm_todosummary MODULE ${kcm_todosummary_PART_SRCS})
kcoreaddons_desktop_to_json(kcm_todosummary "kcmtodosummary.desktop" SERVICE_TYPES kcmodule.desktop)
target_link_libraries(kcm_todosummary Qt::Widgets KF5::KCMUtils KF5::I18n)
########## Unit Test ###########
......
......@@ -13,16 +13,14 @@
#include <KConfig>
#include <KConfigGroup>
#include <KLocalizedString>
#include <KPluginFactory>
#include <QButtonGroup>
KCModule *create_apptsummary(QWidget *parent, const char *)
{
return new KCMApptSummary(parent);
}
K_PLUGIN_CLASS_WITH_JSON(KCMApptSummary, "kcmapptsummary.json")
KCMApptSummary::KCMApptSummary(QWidget *parent)
: KCModule(parent)
KCMApptSummary::KCMApptSummary(QWidget *parent, const QVariantList &args)
: KCModule(parent, args)
{
setupUi(this);
......@@ -162,3 +160,4 @@ const KAboutData *KCMApptSummary::aboutData() const
return about;
}
#include "kcmapptsummary.moc"
......@@ -11,16 +11,12 @@
#include "ui_apptsummaryconfig_base.h"
#include <KCModule>
extern "C" {
Q_DECL_EXPORT KCModule *create_apptsummary(QWidget *parent, const char *);
}
class KCMApptSummary : public KCModule, public Ui::ApptSummaryConfig_Base
{
Q_OBJECT
public:
explicit KCMApptSummary(QWidget *parent = nullptr);
explicit KCMApptSummary(QWidget *parent = nullptr, const QVariantList &args = {});
void load() override;
void save() override;
......
......@@ -14,14 +14,12 @@
#include <KConfig>
#include <KConfigGroup>
#include <KLocalizedString>
#include <KPluginFactory>
KCModule *create_todosummary(QWidget *parent, const char *)
{
return new KCMTodoSummary(parent);
}
K_PLUGIN_CLASS_WITH_JSON(KCMTodoSummary, "kcmtodosummary.json")
KCMTodoSummary::KCMTodoSummary(QWidget *parent)
: KCModule(parent)
KCMTodoSummary::KCMTodoSummary(QWidget *parent, const QVariantList &args)
: KCModule(parent, args)
{
setupUi(this);
......@@ -151,3 +149,5 @@ const KAboutData *KCMTodoSummary::aboutData() const
return about;
}
#include "kcmtodosummary.moc"
......@@ -12,16 +12,12 @@
#include "ui_todosummaryconfig_base.h"
#include <KCModule>
extern "C" {
Q_DECL_EXPORT KCModule *create_todosummary(QWidget *parent, const char *);
}
class KCMTodoSummary : public KCModule, public Ui::TodoSummaryConfig_Base
{
Q_OBJECT
public:
explicit KCMTodoSummary(QWidget *parent = nullptr);
explicit KCMTodoSummary(QWidget *parent = nullptr, const QVariantList &args = {});
~KCMTodoSummary() override;
void load() override;
......
......@@ -33,7 +33,7 @@ set(kcm_sdsummary_PART_SRCS kcmsdsummary.cpp)
ki18n_wrap_ui(kcm_sdsummary_PART_SRCS sdsummaryconfig_base.ui)
add_library(kcm_sdsummary MODULE ${kcm_sdsummary_PART_SRCS})
kcoreaddons_desktop_to_json(kcm_sdsummary "kcmsdsummary.desktop" SERVICE_TYPES kcmodule.desktop)
target_link_libraries(kcm_sdsummary Qt::Widgets KF5::KCMUtils KF5::I18n)
########### install files ###############
......
......@@ -14,16 +14,12 @@
#include <KConfig>
#include <KConfigGroup>
#include <KLocalizedString>
#include <KPluginFactory>
extern "C" {
Q_DECL_EXPORT KCModule *create_sdsummary(QWidget *parent, const char *)
{
return new KCMSDSummary(parent);
}
}
K_PLUGIN_CLASS_WITH_JSON(KCMSDSummary, "kcmsdsummary.json")
KCMSDSummary::KCMSDSummary(QWidget *parent)
: KCModule(parent)
KCMSDSummary::KCMSDSummary(QWidget *parent, const QVariantList &args)
: KCModule(parent, args)
{
setupUi(this);
......@@ -168,3 +164,5 @@ const KAboutData *KCMSDSummary::aboutData() const
return about;
}
#include "kcmsdsummary.moc"
......@@ -17,7 +17,7 @@ class KCMSDSummary : public KCModule, public Ui::SDSummaryConfig_Base
Q_OBJECT
public:
explicit KCMSDSummary(QWidget *parent = nullptr);
explicit KCMSDSummary(QWidget *parent = nullptr, const QVariantList &args = {});
void load() override;
void save() override;
......
......@@ -9,16 +9,13 @@
#include "koprefsdesignerfields.h"
#include <CalendarSupport/KCalPrefs>
#include <KPluginFactory>
#include <QStandardPaths>
extern "C" {
Q_DECL_EXPORT KCModule *create_korgdesignerfields(QWidget *parent, const char *)
{
return new KOPrefsDesignerFields(parent);
}
}
KOPrefsDesignerFields::KOPrefsDesignerFields(QWidget *parent)
: KCMDesignerFields(parent)
K_PLUGIN_CLASS_WITH_JSON(KOPrefsDesignerFields, "korganizer_configdesignerfields.json")
KOPrefsDesignerFields::KOPrefsDesignerFields(QWidget *parent, const QVariantList &args)
: KCMDesignerFields(parent, args)
{
}
......@@ -48,3 +45,5 @@ QString KOPrefsDesignerFields::applicationName()
{
return QStringLiteral("KORGANIZER");
}
#include "koprefsdesignerfields.moc"
......@@ -14,7 +14,7 @@
class KOPrefsDesignerFields : public KCMDesignerFields
{
public:
explicit KOPrefsDesignerFields(QWidget *parent = nullptr);
explicit KOPrefsDesignerFields(QWidget *parent = nullptr, const QVariantList &args = {});
protected:
Q_REQUIRED_RESULT QString localUiDir() override;
......
Markdown is supported
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