Verified Commit 5fd15ecc authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Port away from deprecated KCM create_ functions

parent 490a8368
Pipeline #61350 passed with stage
in 13 minutes and 36 seconds
......@@ -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;
......
......@@ -16,7 +16,8 @@
#include <KLocalizedString>
#include <KPluginFactory>
K_PLUGIN_FACTORY_WITH_JSON(KCMSDSummaryFactory, "kcmsdsummary.json", registerPlugin<KCMSDSummary>();)
K_PLUGIN_CLASS_WITH_JSON(KCMSDSummary, "kcmsdsummary.json")
KCMSDSummary::KCMSDSummary(QWidget *parent, const QVariantList &args)
: KCModule(parent, args)
{
......@@ -163,4 +164,5 @@ const KAboutData *KCMSDSummary::aboutData() const
return about;
}
#include "kcmsdsummary.moc"
......@@ -9,13 +9,10 @@
#include "koprefsdesignerfields.h"
#include <CalendarSupport/KCalPrefs>
#include <KPluginFactory>
#include <QStandardPaths>
extern "C" {
Q_DECL_EXPORT KCModule *create_korgdesignerfields(QWidget *parent, const QVariantList &args = {})
{
return new KOPrefsDesignerFields(parent, args);
}
}
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"
......@@ -9,13 +9,13 @@
#include "koprefsdialogcolorsandfonts.h"
#include "koprefs.h"
#include <KLocalizedString>
#include <AkonadiCore/EntityTreeModel>
#include <CalendarSupport/KCalPrefs>
#include <CollectionComboBox>
#include <KColorButton>
#include <KComboBox>
#include <KLocalizedString>
#include <KPluginFactory>
#include <QCheckBox>
#include <QFontDialog>
#include <QGroupBox>
......@@ -25,6 +25,8 @@
#include <QTabWidget>
#include <TagSelectionComboBox>
K_PLUGIN_CLASS_WITH_JSON(KOPrefsDialogColorsAndFonts, "korganizer_configcolorsandfonts.json")
KOPrefsDialogColorsAndFonts::KOPrefsDialogColorsAndFonts(QWidget *parent, const QVariantList &args)
: Korganizer::KPrefsModule(KOPrefs::instance(), parent, args)
{
......@@ -273,9 +275,4 @@ void KOPrefsDialogColorsAndFonts::updateResourceColor()
mResourceButton->setColor(color);
}
extern "C" {
Q_DECL_EXPORT KCModule *create_korganizerconfigcolorsandfonts(QWidget *parent, const QVariantList &args = {})
{
return new KOPrefsDialogColorsAndFonts(parent, args);
}
}
#include "koprefsdialogcolorsandfonts.moc"
......@@ -8,7 +8,6 @@
*/
#pragma once
#include "kcm_korganizer_export.h"
#include "kprefsdialog.h"
#include <QWidget>
......@@ -23,7 +22,7 @@ class KOPrefsDialogColorsAndFonts : public Korganizer::KPrefsModule
{
Q_OBJECT
public:
explicit KOPrefsDialogColorsAndFonts(QWidget *parent, const QVariantList &args = {});
explicit KOPrefsDialogColorsAndFonts(QWidget *parent, const QVariantList &args);
protected:
void usrWriteConfig() override;
......
......@@ -11,12 +11,15 @@
#include "prefs/koprefs.h"
#include <CalendarSupport/KCalPrefs>
#include <KLocalizedString>
#include <KPluginFactory>
#include <QCheckBox>
#include <QLabel>
#include <QVBoxLayout>
#include <TransportManagementWidget>
#include <akonadi/calendar/calendarsettings.h> //krazy:exclude=camelcase this is a generated file
K_PLUGIN_CLASS_WITH_JSON(KOPrefsDialogGroupScheduling, "korganizer_configgroupscheduling.json")
KOPrefsDialogGroupScheduling::KOPrefsDialogGroupScheduling(QWidget *parent, const QVariantList &args)
: Korganizer::KPrefsModule(KOPrefs::instance(), parent, args)
{
......@@ -51,9 +54,4 @@ void KOPrefsDialogGroupScheduling::usrWriteConfig()
{
}
extern "C" {
Q_DECL_EXPORT KCModule *create_korganizerconfiggroupscheduling(QWidget *parent, const QVariantList &args = {})
{
return new KOPrefsDialogGroupScheduling(parent, args);
}
}
#include "koprefsdialoggroupscheduling.moc"
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