summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-04-16 21:24:51 +0200
committerMontel Laurent <[email protected]>2017-04-16 21:24:51 +0200
commit8504eb5018404c9d46aab7aa6f8890e653e3024e (patch)
tree157f6cefec83fb38f4f10bbb7036e2c93912cee7
parent93fb87456167a55fc029cdbda421c05a6cde3428 (diff)
Convert to plugins
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/autodetect/CMakeLists.txt1
-rw-r--r--src/autodetect/evolutionv1/evolutionv1importdata.cpp6
-rw-r--r--src/autodetect/evolutionv2/evolutionv2importdata.cpp5
-rw-r--r--src/autodetect/evolutionv3/evolutionv3importdata.cpp7
-rw-r--r--src/autodetect/oe/CMakeLists.txt18
-rw-r--r--src/autodetect/oe/oeimportdata.cpp4
7 files changed, 41 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d869a4f..0f5b831 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -51,7 +51,7 @@ set(libimportwizard_autodetect_SRCS
# autodetect/opera/operaimportdata.cpp
# autodetect/opera/operaaddressbook.cpp
# autodetect/opera/operasettings.cpp
- autodetect/oe/oeimportdata.cpp
+# autodetect/oe/oeimportdata.cpp
# autodetect/mailapp/mailappimportdata.cpp
autodetect/pmail/pmailimportdata.cpp
autodetect/pmail/pmailsettings.cpp
diff --git a/src/autodetect/CMakeLists.txt b/src/autodetect/CMakeLists.txt
index ca35101..0aeaed8 100644
--- a/src/autodetect/CMakeLists.txt
+++ b/src/autodetect/CMakeLists.txt
@@ -7,3 +7,4 @@ add_subdirectory(balsa)
add_subdirectory(evolutionv1)
add_subdirectory(evolutionv2)
add_subdirectory(evolutionv3)
+add_subdirectory(oe)
diff --git a/src/autodetect/evolutionv1/evolutionv1importdata.cpp b/src/autodetect/evolutionv1/evolutionv1importdata.cpp
index af11f3e..782aee5 100644
--- a/src/autodetect/evolutionv1/evolutionv1importdata.cpp
+++ b/src/autodetect/evolutionv1/evolutionv1importdata.cpp
@@ -27,6 +27,9 @@
#include <QDir>
+K_PLUGIN_FACTORY_WITH_JSON(Evolutionv1ImporterFactory, "evolutionv1importer.json", registerPlugin<Evolutionv1ImportData>();)
+
+
Evolutionv1ImportData::Evolutionv1ImportData(QObject *parent, const QList<QVariant> &)
: AbstractImporter(parent)
{
@@ -73,3 +76,6 @@ AbstractImporter::TypeSupportedOptions Evolutionv1ImportData::supportedOption()
options |= AbstractImporter::Mails;
return options;
}
+
+#include "evolutionv1importdata.moc"
+
diff --git a/src/autodetect/evolutionv2/evolutionv2importdata.cpp b/src/autodetect/evolutionv2/evolutionv2importdata.cpp
index b5a9158..8411f73 100644
--- a/src/autodetect/evolutionv2/evolutionv2importdata.cpp
+++ b/src/autodetect/evolutionv2/evolutionv2importdata.cpp
@@ -27,6 +27,9 @@
#include <QDir>
+K_PLUGIN_FACTORY_WITH_JSON(Evolutionv2ImporterFactory, "evolutionv2importer.json", registerPlugin<Evolutionv2ImportData>();)
+
+
Evolutionv2ImportData::Evolutionv2ImportData(QObject *parent, const QList<QVariant> &)
: AbstractImporter(parent)
{
@@ -73,3 +76,5 @@ AbstractImporter::TypeSupportedOptions Evolutionv2ImportData::supportedOption()
options |= AbstractImporter::Mails;
return options;
}
+
+#include "evolutionv2importdata.moc"
diff --git a/src/autodetect/evolutionv3/evolutionv3importdata.cpp b/src/autodetect/evolutionv3/evolutionv3importdata.cpp
index 61e4e87..c03c516 100644
--- a/src/autodetect/evolutionv3/evolutionv3importdata.cpp
+++ b/src/autodetect/evolutionv3/evolutionv3importdata.cpp
@@ -25,13 +25,16 @@
#include "mailimporter/filterinfo.h"
#include "importfilterinfogui.h"
#include "MailCommon/FilterImporterExporter"
-
+#include <kpluginfactory.h>
#include "importwizard.h"
#include <KLocalizedString>
#include <QDir>
+K_PLUGIN_FACTORY_WITH_JSON(Evolutionv3ImporterFactory, "evolutionv3importer.json", registerPlugin<Evolutionv3ImportData>();)
+
+
Evolutionv3ImportData::Evolutionv3ImportData(QObject *parent, const QList<QVariant> &)
: AbstractImporter(parent)
{
@@ -123,3 +126,5 @@ AbstractImporter::TypeSupportedOptions Evolutionv3ImportData::supportedOption()
options |= AbstractImporter::AddressBooks;
return options;
}
+
+#include "evolutionv3importdata.moc"
diff --git a/src/autodetect/oe/CMakeLists.txt b/src/autodetect/oe/CMakeLists.txt
new file mode 100644
index 0000000..07dcbec
--- /dev/null
+++ b/src/autodetect/oe/CMakeLists.txt
@@ -0,0 +1,18 @@
+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
+)
diff --git a/src/autodetect/oe/oeimportdata.cpp b/src/autodetect/oe/oeimportdata.cpp
index bb62255..efbd400 100644
--- a/src/autodetect/oe/oeimportdata.cpp
+++ b/src/autodetect/oe/oeimportdata.cpp
@@ -28,6 +28,8 @@
#include <QDir>
+K_PLUGIN_FACTORY_WITH_JSON(OEImporterFactory, "oeimporter.json", registerPlugin<OeImportData>();)
+
OeImportData::OeImportData(QObject *parent, const QList<QVariant> &)
: AbstractImporter(parent)
{
@@ -76,3 +78,5 @@ AbstractImporter::TypeSupportedOptions OeImportData::supportedOption()
options |= AbstractImporter::Mails;
return options;
}
+
+#include "oeimportdata.moc"