Commit 8504eb50 authored by Laurent Montel's avatar Laurent Montel 😁

Convert to plugins

parent 93fb8745
...@@ -51,7 +51,7 @@ set(libimportwizard_autodetect_SRCS ...@@ -51,7 +51,7 @@ set(libimportwizard_autodetect_SRCS
# autodetect/opera/operaimportdata.cpp # autodetect/opera/operaimportdata.cpp
# autodetect/opera/operaaddressbook.cpp # autodetect/opera/operaaddressbook.cpp
# autodetect/opera/operasettings.cpp # autodetect/opera/operasettings.cpp
autodetect/oe/oeimportdata.cpp # autodetect/oe/oeimportdata.cpp
# autodetect/mailapp/mailappimportdata.cpp # autodetect/mailapp/mailappimportdata.cpp
autodetect/pmail/pmailimportdata.cpp autodetect/pmail/pmailimportdata.cpp
autodetect/pmail/pmailsettings.cpp autodetect/pmail/pmailsettings.cpp
......
...@@ -7,3 +7,4 @@ add_subdirectory(balsa) ...@@ -7,3 +7,4 @@ add_subdirectory(balsa)
add_subdirectory(evolutionv1) add_subdirectory(evolutionv1)
add_subdirectory(evolutionv2) add_subdirectory(evolutionv2)
add_subdirectory(evolutionv3) add_subdirectory(evolutionv3)
add_subdirectory(oe)
...@@ -27,6 +27,9 @@ ...@@ -27,6 +27,9 @@
#include <QDir> #include <QDir>
K_PLUGIN_FACTORY_WITH_JSON(Evolutionv1ImporterFactory, "evolutionv1importer.json", registerPlugin<Evolutionv1ImportData>();)
Evolutionv1ImportData::Evolutionv1ImportData(QObject *parent, const QList<QVariant> &) Evolutionv1ImportData::Evolutionv1ImportData(QObject *parent, const QList<QVariant> &)
: AbstractImporter(parent) : AbstractImporter(parent)
{ {
...@@ -73,3 +76,6 @@ AbstractImporter::TypeSupportedOptions Evolutionv1ImportData::supportedOption() ...@@ -73,3 +76,6 @@ AbstractImporter::TypeSupportedOptions Evolutionv1ImportData::supportedOption()
options |= AbstractImporter::Mails; options |= AbstractImporter::Mails;
return options; return options;
} }
#include "evolutionv1importdata.moc"
...@@ -27,6 +27,9 @@ ...@@ -27,6 +27,9 @@
#include <QDir> #include <QDir>
K_PLUGIN_FACTORY_WITH_JSON(Evolutionv2ImporterFactory, "evolutionv2importer.json", registerPlugin<Evolutionv2ImportData>();)
Evolutionv2ImportData::Evolutionv2ImportData(QObject *parent, const QList<QVariant> &) Evolutionv2ImportData::Evolutionv2ImportData(QObject *parent, const QList<QVariant> &)
: AbstractImporter(parent) : AbstractImporter(parent)
{ {
...@@ -73,3 +76,5 @@ AbstractImporter::TypeSupportedOptions Evolutionv2ImportData::supportedOption() ...@@ -73,3 +76,5 @@ AbstractImporter::TypeSupportedOptions Evolutionv2ImportData::supportedOption()
options |= AbstractImporter::Mails; options |= AbstractImporter::Mails;
return options; return options;
} }
#include "evolutionv2importdata.moc"
...@@ -25,13 +25,16 @@ ...@@ -25,13 +25,16 @@
#include "mailimporter/filterinfo.h" #include "mailimporter/filterinfo.h"
#include "importfilterinfogui.h" #include "importfilterinfogui.h"
#include "MailCommon/FilterImporterExporter" #include "MailCommon/FilterImporterExporter"
#include <kpluginfactory.h>
#include "importwizard.h" #include "importwizard.h"
#include <KLocalizedString> #include <KLocalizedString>
#include <QDir> #include <QDir>
K_PLUGIN_FACTORY_WITH_JSON(Evolutionv3ImporterFactory, "evolutionv3importer.json", registerPlugin<Evolutionv3ImportData>();)
Evolutionv3ImportData::Evolutionv3ImportData(QObject *parent, const QList<QVariant> &) Evolutionv3ImportData::Evolutionv3ImportData(QObject *parent, const QList<QVariant> &)
: AbstractImporter(parent) : AbstractImporter(parent)
{ {
...@@ -123,3 +126,5 @@ AbstractImporter::TypeSupportedOptions Evolutionv3ImportData::supportedOption() ...@@ -123,3 +126,5 @@ AbstractImporter::TypeSupportedOptions Evolutionv3ImportData::supportedOption()
options |= AbstractImporter::AddressBooks; options |= AbstractImporter::AddressBooks;
return options; return options;
} }
#include "evolutionv3importdata.moc"
set(oeimporter_SRCS
oeimportdata.cpp
)
kcoreaddons_add_plugin(oeimporterplugin JSON oeimporter.json SOURCES
${oeimporter_SRCS} INSTALL_NAMESPACE importwizard)
target_link_libraries(oeimporterplugin
libimportwizard
KF5::XmlGui
KF5::I18n
KF5::Contacts
KF5::MailImporterAkonadi
KF5::MailTransport
KF5::IdentityManagement
KF5::MailCommon
)
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
#include <QDir> #include <QDir>
K_PLUGIN_FACTORY_WITH_JSON(OEImporterFactory, "oeimporter.json", registerPlugin<OeImportData>();)
OeImportData::OeImportData(QObject *parent, const QList<QVariant> &) OeImportData::OeImportData(QObject *parent, const QList<QVariant> &)
: AbstractImporter(parent) : AbstractImporter(parent)
{ {
...@@ -76,3 +78,5 @@ AbstractImporter::TypeSupportedOptions OeImportData::supportedOption() ...@@ -76,3 +78,5 @@ AbstractImporter::TypeSupportedOptions OeImportData::supportedOption()
options |= AbstractImporter::Mails; options |= AbstractImporter::Mails;
return options; return options;
} }
#include "oeimportdata.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