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

Fix simplified macro which will add to 5.44. Allow to fix factory name in some plugin

parent 9551c416
......@@ -140,6 +140,8 @@ set_package_properties("Poppler" PROPERTIES TYPE OPTIONAL PURPOSE "Support for P
if(KDEPIMADDONS_BUILD_EXAMPLES)
add_subdirectory(examples)
endif()
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
add_subdirectory(plugins)
add_subdirectory(korganizer)
......
......@@ -20,14 +20,14 @@
#include "evolutionv1importdata.h"
#include "mailimporter/filterevolution.h"
#include "mailimporter/filterinfo.h"
#include "kcoreaddons_kdepim_compat.h"
#include <KLocalizedString>
#include <kpluginfactory.h>
#include <QDir>
K_PLUGIN_FACTORY_WITH_JSON(Evolutionv1ImporterFactory, "evolutionv1importer.json", registerPlugin<Evolutionv1ImportData>();
)
K_PLUGIN_CLASS_WITH_JSON(Evolutionv1ImportData, "evolutionv1importer.json")
Evolutionv1ImportData::Evolutionv1ImportData(QObject *parent, const QList<QVariant> &)
: LibImportWizard::AbstractImporter(parent)
......
......@@ -20,14 +20,13 @@
#include "evolutionv2importdata.h"
#include "mailimporter/filterevolution_v2.h"
#include "mailimporter/filterinfo.h"
#include "kcoreaddons_kdepim_compat.h"
#include <KLocalizedString>
#include <kpluginfactory.h>
#include <QDir>
K_PLUGIN_FACTORY_WITH_JSON(Evolutionv2ImporterFactory, "evolutionv2importer.json", registerPlugin<Evolutionv2ImportData>();
)
K_PLUGIN_CLASS_WITH_JSON(Evolutionv2ImportData, "evolutionv2importer.json")
Evolutionv2ImportData::Evolutionv2ImportData(QObject *parent, const QList<QVariant> &)
: LibImportWizard::AbstractImporter(parent)
......
......@@ -22,13 +22,12 @@
#include "gearyaddressbook.h"
#include "mailimporter/filterinfo.h"
#include "mailimporter/othermailerutil.h"
#include "kcoreaddons_kdepim_compat.h"
#include "gearyplugin_debug.h"
#include <kpluginfactory.h>
#include <QDir>
K_PLUGIN_FACTORY_WITH_JSON(GearyImporterFactory, "gearyimporter.json", registerPlugin<GearyImportData>();
)
K_PLUGIN_CLASS_WITH_JSON(GearyImportData, "gearyimporter.json")
GearyImportData::GearyImportData(QObject *parent, const QList<QVariant> &)
: LibImportWizard::AbstractImporter(parent)
......
......@@ -21,13 +21,12 @@
#include "nylasmailsettings.h"
#include "mailimporter/filterinfo.h"
#include "mailimporter/othermailerutil.h"
#include "kcoreaddons_kdepim_compat.h"
#include "nylasmailplugin_debug.h"
#include <kpluginfactory.h>
#include <QDir>
K_PLUGIN_FACTORY_WITH_JSON(NylasMailImporterFactory, "nylasmailimporter.json", registerPlugin<NylasMailImportData>();
)
K_PLUGIN_CLASS_WITH_JSON(NylasMailImportData, "nylasmailimporter.json")
NylasMailImportData::NylasMailImportData(QObject *parent, const QList<QVariant> &)
: LibImportWizard::AbstractImporter(parent)
......
......@@ -22,13 +22,12 @@
#include "operasettings.h"
#include "mailimporter/filteropera.h"
#include "mailimporter/filterinfo.h"
#include "kcoreaddons_kdepim_compat.h"
#include <KLocalizedString>
#include <kpluginfactory.h>
#include <QDir>
K_PLUGIN_FACTORY_WITH_JSON(OperaImporterFactory, "operaimporter.json", registerPlugin<OperaImportData>();
)
K_PLUGIN_CLASS_WITH_JSON(OperaImportData, "operaimporter.json")
OperaImportData::OperaImportData(QObject *parent, const QList<QVariant> &)
: LibImportWizard::AbstractImporter(parent)
......
......@@ -19,12 +19,13 @@
#include "addresslocationeditorplugin.h"
#include <kpluginfactory.h>
#include "kcoreaddons_kdepim_compat.h"
#include "addresseditor/addresseslocationwidget.h"
#include <QHBoxLayout>
K_PLUGIN_FACTORY_WITH_JSON(AddressLocationEditorFactory, "addresslocationeditorplugin.json", registerPlugin<AddressLocationEditor>();
)
K_PLUGIN_CLASS_WITH_JSON(AddressLocationEditor, "addresslocationeditorplugin.json")
AddressLocationEditor::AddressLocationEditor(QWidget *parent, const QList<QVariant> &)
: ContactEditor::AbstractAddressLocationWidget(parent)
......
......@@ -20,9 +20,8 @@
#include "csvimportexportplugin.h"
#include "csvimportexportplugininterface.h"
#include <kpluginfactory.h>
K_PLUGIN_FACTORY_WITH_JSON(CSVImportExportPluginFactory, "kaddressbook_importexportcsvplugin.json", registerPlugin<CSVImportExportPlugin>();
)
#include "kcoreaddons_kdepim_compat.h"
K_PLUGIN_CLASS_WITH_JSON(CSVImportExportPlugin, "kaddressbook_importexportcsvplugin.json")
CSVImportExportPlugin::CSVImportExportPlugin(QObject *parent, const QList<QVariant> &)
: KAddressBookImportExport::KAddressBookImportExportPlugin(parent)
......
......@@ -20,9 +20,8 @@
#include "gmximportexportplugin.h"
#include "gmximportexportplugininterface.h"
#include <kpluginfactory.h>
K_PLUGIN_FACTORY_WITH_JSON(GMXImportExportPluginFactory, "kaddressbook_importexportgmxplugin.json", registerPlugin<GMXImportExportPlugin>();
)
#include "kcoreaddons_kdepim_compat.h"
K_PLUGIN_CLASS_WITH_JSON(GMXImportExportPlugin, "kaddressbook_importexportgmxplugin.json")
GMXImportExportPlugin::GMXImportExportPlugin(QObject *parent, const QList<QVariant> &)
: KAddressBookImportExport::KAddressBookImportExportPlugin(parent)
......
......@@ -20,9 +20,8 @@
#include "ldapimportexportplugin.h"
#include "ldapimportexportplugininterface.h"
#include <kpluginfactory.h>
K_PLUGIN_FACTORY_WITH_JSON(LDapImportExportPluginFactory, "kaddressbook_importexportldapplugin.json", registerPlugin<LDapImportExportPlugin>();
)
#include "kcoreaddons_kdepim_compat.h"
K_PLUGIN_CLASS_WITH_JSON(LDapImportExportPlugin, "kaddressbook_importexportldapplugin.json")
LDapImportExportPlugin::LDapImportExportPlugin(QObject *parent, const QList<QVariant> &)
: KAddressBookImportExport::KAddressBookImportExportPlugin(parent)
......
......@@ -20,9 +20,8 @@
#include "ldifimportexportplugin.h"
#include "ldifimportexportplugininterface.h"
#include <kpluginfactory.h>
K_PLUGIN_FACTORY_WITH_JSON(LDifImportExportPluginFactory, "kaddressbook_importexportldifplugin.json", registerPlugin<LDifImportExportPlugin>();
)
#include "kcoreaddons_kdepim_compat.h"
K_PLUGIN_CLASS_WITH_JSON(LDifImportExportPlugin, "kaddressbook_importexportldifplugin.json")
LDifImportExportPlugin::LDifImportExportPlugin(QObject *parent, const QList<QVariant> &)
: KAddressBookImportExport::KAddressBookImportExportPlugin(parent)
......
......@@ -20,9 +20,8 @@
#include "vcardimportexportplugin.h"
#include "vcardimportexportplugininterface.h"
#include <kpluginfactory.h>
K_PLUGIN_FACTORY_WITH_JSON(VCardImportExportPluginFactory, "kaddressbook_importexportvcardplugin.json", registerPlugin<VCardImportExportPlugin>();
)
#include "kcoreaddons_kdepim_compat.h"
K_PLUGIN_CLASS_WITH_JSON(VCardImportExportPlugin, "kaddressbook_importexportvcardplugin.json")
VCardImportExportPlugin::VCardImportExportPlugin(QObject *parent, const QList<QVariant> &)
: KAddressBookImportExport::KAddressBookImportExportPlugin(parent)
{
......
......@@ -20,8 +20,8 @@
#include "checkgravatarplugin.h"
#include "checkgravatarplugininterface.h"
#include <kpluginfactory.h>
K_PLUGIN_FACTORY_WITH_JSON(CheckGravatarPluginFactory, "kaddressbook_checkgravatarplugin.json", registerPlugin<CheckGravatarPlugin>();
#include "kcoreaddons_kdepim_compat.h"
K_PLUGIN_CLASS_WITH_JSON(CheckGravatarPlugin, "kaddressbook_checkgravatarplugin.json"
)
CheckGravatarPlugin::CheckGravatarPlugin(QObject *parent, const QList<QVariant> &)
......
......@@ -20,8 +20,8 @@
#include "mergecontactsplugin.h"
#include "mergecontactsplugininterface.h"
#include <kpluginfactory.h>
K_PLUGIN_FACTORY_WITH_JSON(MergeContactsPluginFactory, "kaddressbook_mergecontactsplugin.json", registerPlugin<MergeContactsPlugin>();
#include "kcoreaddons_kdepim_compat.h"
K_PLUGIN_CLASS_WITH_JSON(MergeContactsPlugin, "kaddressbook_mergecontactsplugin.json"
)
MergeContactsPlugin::MergeContactsPlugin(QObject *parent, const QList<QVariant> &)
......
......@@ -20,9 +20,8 @@
#include "searchduplicatesplugin.h"
#include "searchduplicatesplugininterface.h"
#include <kpluginfactory.h>
K_PLUGIN_FACTORY_WITH_JSON(MergeContactsPluginFactory, "kaddressbook_searchduplicatesplugin.json", registerPlugin<SearchDuplicatesPlugin>();
)
#include "kcoreaddons_kdepim_compat.h"
K_PLUGIN_CLASS_WITH_JSON(SearchDuplicatesPlugin, "kaddressbook_searchduplicatesplugin.json")
SearchDuplicatesPlugin::SearchDuplicatesPlugin(QObject *parent, const QList<QVariant> &)
: PimCommon::GenericPlugin(parent)
......
......@@ -20,9 +20,8 @@
#include "sendmailplugin.h"
#include "sendmailplugininterface.h"
#include <kpluginfactory.h>
K_PLUGIN_FACTORY_WITH_JSON(SendMailPluginFactory, "kaddressbook_sendmailplugin.json", registerPlugin<SendMailPlugin>();
)
#include "kcoreaddons_kdepim_compat.h"
K_PLUGIN_CLASS_WITH_JSON(SendMailPlugin, "kaddressbook_sendmailplugin.json")
SendMailPlugin::SendMailPlugin(QObject *parent, const QList<QVariant> &)
: PimCommon::GenericPlugin(parent)
......
......@@ -20,9 +20,8 @@
#include "sendvcardsplugin.h"
#include "sendvcardsplugininterface.h"
#include <kpluginfactory.h>
K_PLUGIN_FACTORY_WITH_JSON(SendVcardsPluginFactory, "kaddressbook_sendvcardsplugin.json", registerPlugin<SendVcardsPlugin>();
)
#include "kcoreaddons_kdepim_compat.h"
K_PLUGIN_CLASS_WITH_JSON(SendVcardsPlugin, "kaddressbook_sendvcardsplugin.json")
SendVcardsPlugin::SendVcardsPlugin(QObject *parent, const QList<QVariant> &)
: PimCommon::GenericPlugin(parent)
......
/*
Copyright (c) 2018 Montel Laurent <montel@kde.org>
This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Library General Public License as published
by the Free Software Foundation; either version 2 of the License or
( at your option ) version 3 or, at the discretion of KDE e.V.
( which shall act as a proxy as in section 14 of the GPLv3 ), any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KCOREADDONS_KDEPIM_COMPAT_H
#define KCOREADDONS_KDEPIM_COMPAT_H
#include <kcoreaddons_version.h>
#include <kpluginfactory.h>
#if KCOREADDONS_VERSION < QT_VERSION_CHECK(5, 44, 0)
#define K_PLUGIN_CLASS_WITH_JSON(classname, json) K_PLUGIN_FACTORY_WITH_JSON(classname ## Factory, json, registerPlugin<classname >();)
#endif
#endif
......@@ -21,9 +21,8 @@
#include "externalcomposerplugineditorinterface.h"
#include "externalcomposerconfiguredialog.h"
#include <kpluginfactory.h>
K_PLUGIN_FACTORY_WITH_JSON(ExternalComposerPluginEditorFactory, "kmail_externalcomposereditorplugin.json", registerPlugin<ExternalComposerPluginEditor>();
)
#include "kcoreaddons_kdepim_compat.h"
K_PLUGIN_CLASS_WITH_JSON(ExternalComposerPluginEditor, "kmail_externalcomposereditorplugin.json")
ExternalComposerPluginEditor::ExternalComposerPluginEditor(QObject *parent, const QList<QVariant> &)
: MessageComposer::PluginEditorInit(parent)
......
......@@ -20,9 +20,8 @@
#include "autocorrectionplugineditor.h"
#include "autocorrectionplugineditorinterface.h"
#include <kpluginfactory.h>
K_PLUGIN_FACTORY_WITH_JSON(AutoCorrectionPluginEditorFactory, "kmail_autocorrectioneditorplugin.json", registerPlugin<AutoCorrectionPluginEditor>();
)
#include "kcoreaddons_kdepim_compat.h"
K_PLUGIN_CLASS_WITH_JSON(AutoCorrectionPluginEditor, "kmail_autocorrectioneditorplugin.json")
AutoCorrectionPluginEditor::AutoCorrectionPluginEditor(QObject *parent, const QList<QVariant> &)
: MessageComposer::PluginEditor(parent)
......
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