Commit d938985b authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port plugins

parent 481c1372
Pipeline #61242 failed with stage
in 9 minutes and 32 seconds
......@@ -26,6 +26,8 @@ set(kcm_kmailsummary_PART_SRCS kcmkmailsummary.cpp ${kontact_kmail_plugins_inter
add_library(kcm_kmailsummary MODULE ${kcm_kmailsummary_PART_SRCS})
pim_target_precompile_headers(kcm_kmailsummary PUBLIC ../../../kmail_pch.h)
kcoreaddons_desktop_to_json(kcm_kmailsummary "kmailplugin.desktop" SERVICE_TYPES kcmodule.desktop)
add_dependencies(kcm_kmailsummary kmail_xml)
target_link_libraries(kcm_kmailsummary KF5::Mime KF5::PimCommonAkonadi Qt::DBus KF5::ConfigWidgets KF5::I18n)
......@@ -37,7 +39,6 @@ install(TARGETS kontact_kmailplugin DESTINATION ${KDE_INSTALL_PLUGINDIR}/kontact
install(TARGETS kcm_kmailsummary DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(FILES kmailplugin.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR}/kontact)
kcoreaddons_desktop_to_json(kontact_kmailplugin kmailplugin.desktop)
install(FILES kcmkmailsummary.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
......
......@@ -18,21 +18,16 @@
#include <KAcceleratorManager>
#include <KConfig>
#include <KLocalizedString>
#include <KPluginFactory>
#include <KSharedConfig>
#include <QCheckBox>
#include <QTreeView>
#include <QVBoxLayout>
extern "C" {
Q_DECL_EXPORT KCModule *create_kmailsummary(QWidget *parent, const char *)
{
return new KCMKMailSummary(parent);
}
}
KCMKMailSummary::KCMKMailSummary(QWidget *parent)
: KCModule(parent)
K_PLUGIN_FACTORY_WITH_JSON(KCMKMailSummaryFactory, "kmailplugin.json", registerPlugin<KCMKMailSummary>();)
KCMKMailSummary::KCMKMailSummary(QWidget *parent, const QVariantList &args)
: KCModule(parent, args)
{
initGUI();
......@@ -121,3 +116,4 @@ void KCMKMailSummary::defaults()
Q_EMIT changed(true);
}
#include "kcmkmailsummary.moc"
......@@ -28,7 +28,7 @@ class KCMKMailSummary : public KCModule
Q_OBJECT
public:
explicit KCMKMailSummary(QWidget *parent = nullptr);
explicit KCMKMailSummary(QWidget *parent = nullptr, const QVariantList &args = {});
void load() override;
void save() override;
......
......@@ -18,6 +18,7 @@ kcoreaddons_desktop_to_json(kontact_summaryplugin summaryplugin.desktop)
set(kcm_kontactsummary_PART_SRCS kcmkontactsummary.cpp)
add_library(kcm_kontactsummary MODULE ${kcm_kontactsummary_PART_SRCS})
kcoreaddons_desktop_to_json(kcm_kontactsummary "kcmkontactsummary.desktop" SERVICE_TYPES kcmodule.desktop)
pim_target_precompile_headers(kcm_kontactsummary PUBLIC ../../../kmail_pch.h)
target_link_libraries(kcm_kontactsummary KF5::I18n KF5::KCMUtils Qt::Widgets KF5::KCMUtils KF5::I18n KF5::KontactInterface)
......
......@@ -9,23 +9,17 @@
#include "kcmkontactsummary.h"
#include <KontactInterface/Plugin>
#include <KAboutData>
#include <KConfig>
#include <KLocalizedString>
#include <KPluginFactory>
#include <KPluginInfo>
#include <KPluginMetaData>
#include <KontactInterface/Plugin>
#include <QIcon>
#include <QLabel>
#include <QVBoxLayout>
extern "C" {
Q_DECL_EXPORT KCModule *create_kontactsummary(QWidget *parent, const char *)
{
return new KCMKontactSummary(parent);
}
}
class PluginItem : public QTreeWidgetItem
{
......@@ -71,8 +65,10 @@ PluginView::PluginView(QWidget *parent)
PluginView::~PluginView() = default;
KCMKontactSummary::KCMKontactSummary(QWidget *parent)
: KCModule(parent)
K_PLUGIN_FACTORY_WITH_JSON(KCMKontactSummaryFactory, "kcmkontactsummary.json", registerPlugin<KCMKontactSummary>();)
KCMKontactSummary::KCMKontactSummary(QWidget *parent, const QVariantList &args)
: KCModule(parent, args)
{
setButtons(NoAdditionalButton);
auto layout = new QVBoxLayout(this);
......@@ -165,3 +161,4 @@ void KCMKontactSummary::save()
KConfigGroup grp(&config, QString());
grp.writeEntry("ActiveSummaries", activeSummaries);
}
#include "kcmkontactsummary.moc"
......@@ -26,7 +26,7 @@ class KCMKontactSummary : public KCModule
Q_OBJECT
public:
explicit KCMKontactSummary(QWidget *parent = nullptr);
explicit KCMKontactSummary(QWidget *parent = nullptr, const QVariantList &args = {});
void load() override;
void save() 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