Commit 93fb8745 authored by Laurent Montel's avatar Laurent Montel 😁

Convert to plugins

parent c56da2b0
...@@ -41,13 +41,13 @@ set(libimportwizard_autodetect_SRCS ...@@ -41,13 +41,13 @@ set(libimportwizard_autodetect_SRCS
autodetect/sylpheed/sylpheedsettings.cpp autodetect/sylpheed/sylpheedsettings.cpp
autodetect/sylpheed/sylpheedaddressbook.cpp autodetect/sylpheed/sylpheedaddressbook.cpp
autodetect/sylpheed/sylpheedsettingsutils.cpp autodetect/sylpheed/sylpheedsettingsutils.cpp
autodetect/evolutionv3/evolutionv3importdata.cpp # autodetect/evolutionv3/evolutionv3importdata.cpp
autodetect/evolutionv3/evolutionsettings.cpp # autodetect/evolutionv3/evolutionsettings.cpp
autodetect/evolutionv3/evolutioncalendar.cpp # autodetect/evolutionv3/evolutioncalendar.cpp
autodetect/evolutionv3/evolutionaddressbook.cpp # autodetect/evolutionv3/evolutionaddressbook.cpp
autodetect/evolutionv3/evolutionutil.cpp # autodetect/evolutionv3/evolutionutil.cpp
autodetect/evolutionv2/evolutionv2importdata.cpp # autodetect/evolutionv2/evolutionv2importdata.cpp
autodetect/evolutionv1/evolutionv1importdata.cpp # autodetect/evolutionv1/evolutionv1importdata.cpp
# autodetect/opera/operaimportdata.cpp # autodetect/opera/operaimportdata.cpp
# autodetect/opera/operaaddressbook.cpp # autodetect/opera/operaaddressbook.cpp
# autodetect/opera/operasettings.cpp # autodetect/opera/operasettings.cpp
......
...@@ -4,3 +4,6 @@ add_subdirectory(opera) ...@@ -4,3 +4,6 @@ add_subdirectory(opera)
add_subdirectory(mailapp) add_subdirectory(mailapp)
add_subdirectory(pmail) add_subdirectory(pmail)
add_subdirectory(balsa) add_subdirectory(balsa)
add_subdirectory(evolutionv1)
add_subdirectory(evolutionv2)
add_subdirectory(evolutionv3)
set(evolutionv1importer_SRCS
evolutionv1importdata.cpp
)
kcoreaddons_add_plugin(evolutionv1importerplugin JSON evolutionv1importer.json SOURCES
${evolutionv1importer_SRCS} INSTALL_NAMESPACE importwizard)
target_link_libraries(evolutionv1importerplugin
libimportwizard
KF5::XmlGui
KF5::I18n
KF5::Contacts
KF5::MailImporterAkonadi
KF5::MailTransport
KF5::MailCommon
KF5::IdentityManagement
KF5::MessageViewer
)
set(evolutionv2importer_SRCS
evolutionv2importdata.cpp
)
kcoreaddons_add_plugin(evolutionv2importerplugin JSON evolutionv2importer.json SOURCES
${evolutionv2importer_SRCS} INSTALL_NAMESPACE importwizard)
target_link_libraries(evolutionv2importerplugin
libimportwizard
KF5::XmlGui
KF5::I18n
KF5::Contacts
KF5::MailImporterAkonadi
KF5::MailTransport
KF5::MailCommon
KF5::IdentityManagement
KF5::MessageViewer
)
set(evolutionv3importer_SRCS
evolutionaddressbook.cpp
evolutionv3importdata.cpp
evolutionsettings.cpp
evolutioncalendar.cpp
evolutionutil.cpp
)
kcoreaddons_add_plugin(evolutionv3importerplugin JSON evolutionv3importer.json SOURCES
${evolutionv3importer_SRCS} INSTALL_NAMESPACE importwizard)
target_link_libraries(evolutionv3importerplugin
libimportwizard
KF5::XmlGui
KF5::I18n
KF5::Contacts
KF5::MailImporterAkonadi
KF5::MailTransport
KF5::MailCommon
KF5::IdentityManagement
KF5::MessageViewer
)
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include "evolutioncalendar.h" #include "evolutioncalendar.h"
#include "evolutionutil.h" #include "evolutionutil.h"
#include "importwizard_debug.h" //#include "importwizard_debug.h"
#include <QFile> #include <QFile>
#include <QDir> #include <QDir>
...@@ -42,7 +42,7 @@ void EvolutionCalendar::loadCalendar(const QString &filename) ...@@ -42,7 +42,7 @@ void EvolutionCalendar::loadCalendar(const QString &filename)
//Read gconf file //Read gconf file
QFile file(filename); QFile file(filename);
if (!file.open(QIODevice::ReadOnly)) { if (!file.open(QIODevice::ReadOnly)) {
qCDebug(IMPORTWIZARD_LOG) << " We can't open file" << filename; //FIXME qCDebug(IMPORTWIZARD_LOG) << " We can't open file" << filename;
return; return;
} }
QDomDocument doc; QDomDocument doc;
...@@ -52,7 +52,7 @@ void EvolutionCalendar::loadCalendar(const QString &filename) ...@@ -52,7 +52,7 @@ void EvolutionCalendar::loadCalendar(const QString &filename)
QDomElement config = doc.documentElement(); QDomElement config = doc.documentElement();
if (config.isNull()) { if (config.isNull()) {
qCDebug(IMPORTWIZARD_LOG) << "No config found"; //FIXME qCDebug(IMPORTWIZARD_LOG) << "No config found";
return; return;
} }
mCalendarPath = QDir::homePath() + QLatin1String("/.local/share/evolution/calendar/"); mCalendarPath = QDir::homePath() + QLatin1String("/.local/share/evolution/calendar/");
...@@ -64,7 +64,7 @@ void EvolutionCalendar::loadCalendar(const QString &filename) ...@@ -64,7 +64,7 @@ void EvolutionCalendar::loadCalendar(const QString &filename)
if (attr == QLatin1String("sources")) { if (attr == QLatin1String("sources")) {
readCalendar(e); readCalendar(e);
} else { } else {
qCDebug(IMPORTWIZARD_LOG) << " attr unknown " << attr; //FIXME qCDebug(IMPORTWIZARD_LOG) << " attr unknown " << attr;
} }
} }
} }
...@@ -92,7 +92,7 @@ void EvolutionCalendar::extractCalendarInfo(const QString &info) ...@@ -92,7 +92,7 @@ void EvolutionCalendar::extractCalendarInfo(const QString &info)
QDomElement domElement = cal.documentElement(); QDomElement domElement = cal.documentElement();
if (domElement.isNull()) { if (domElement.isNull()) {
qCDebug(IMPORTWIZARD_LOG) << "Account not found"; //FIXME qCDebug(IMPORTWIZARD_LOG) << "Account not found";
return; return;
} }
QString base_uri; QString base_uri;
...@@ -134,28 +134,28 @@ void EvolutionCalendar::extractCalendarInfo(const QString &info) ...@@ -134,28 +134,28 @@ void EvolutionCalendar::extractCalendarInfo(const QString &info)
} }
} }
} else if (propertyName == QLatin1String("alarm")) { } else if (propertyName == QLatin1String("alarm")) {
qCDebug(IMPORTWIZARD_LOG) << " need to implement alarm property"; //FIXME qCDebug(IMPORTWIZARD_LOG) << " need to implement alarm property";
} else { } else {
qCDebug(IMPORTWIZARD_LOG) << " property unknown :" << propertyName; //FIXME qCDebug(IMPORTWIZARD_LOG) << " property unknown :" << propertyName;
} }
} }
} else { } else {
qCDebug(IMPORTWIZARD_LOG) << " tag unknown :" << propertyTag; //FIXME qCDebug(IMPORTWIZARD_LOG) << " tag unknown :" << propertyTag;
} }
} }
} }
AbstractBase::createResource(QStringLiteral("akonadi_ical_resource"), name, settings); AbstractBase::createResource(QStringLiteral("akonadi_ical_resource"), name, settings);
} else { } else {
qCDebug(IMPORTWIZARD_LOG) << " tag unknown :" << tag; //FIXME qCDebug(IMPORTWIZARD_LOG) << " tag unknown :" << tag;
} }
} }
} else if (base_uri == QLatin1String("webcal://")) { } else if (base_uri == QLatin1String("webcal://")) {
qCDebug(IMPORTWIZARD_LOG) << " need to implement webcal protocol"; //FIXME qCDebug(IMPORTWIZARD_LOG) << " need to implement webcal protocol";
} else if (base_uri == QLatin1String("google://")) { } else if (base_uri == QLatin1String("google://")) {
qCDebug(IMPORTWIZARD_LOG) << " need to implement google protocol"; //FIXME qCDebug(IMPORTWIZARD_LOG) << " need to implement google protocol";
} else if (base_uri == QLatin1String("caldav://")) { } else if (base_uri == QLatin1String("caldav://")) {
qCDebug(IMPORTWIZARD_LOG) << " need to implement caldav protocol"; //FIXME qCDebug(IMPORTWIZARD_LOG) << " need to implement caldav protocol";
} else { } else {
qCDebug(IMPORTWIZARD_LOG) << " base_uri unknown" << base_uri; //FIXME qCDebug(IMPORTWIZARD_LOG) << " base_uri unknown" << base_uri;
} }
} }
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include "evolutionutil.h" #include "evolutionutil.h"
#include "importwizard_debug.h" //#include "importwizard_debug.h"
#include <QDomDocument> #include <QDomDocument>
#include <QFile> #include <QFile>
...@@ -30,8 +30,8 @@ bool EvolutionUtil::loadInDomDocument(QFile *file, QDomDocument &doc) ...@@ -30,8 +30,8 @@ bool EvolutionUtil::loadInDomDocument(QFile *file, QDomDocument &doc)
int errorRow; int errorRow;
int errorCol; int errorCol;
if (!doc.setContent(file, &errorMsg, &errorRow, &errorCol)) { if (!doc.setContent(file, &errorMsg, &errorRow, &errorCol)) {
qCDebug(IMPORTWIZARD_LOG) << "Unable to load document.Parse error in line " << errorRow //FIXME qCDebug(IMPORTWIZARD_LOG) << "Unable to load document.Parse error in line " << errorRow
<< ", col " << errorCol << ": " << errorMsg; //<< ", col " << errorCol << ": " << errorMsg;
return false; return false;
} }
return true; return true;
...@@ -43,8 +43,8 @@ bool EvolutionUtil::loadInDomDocument(const QString &file, QDomDocument &doc) ...@@ -43,8 +43,8 @@ bool EvolutionUtil::loadInDomDocument(const QString &file, QDomDocument &doc)
int errorRow; int errorRow;
int errorCol; int errorCol;
if (!doc.setContent(file, &errorMsg, &errorRow, &errorCol)) { if (!doc.setContent(file, &errorMsg, &errorRow, &errorCol)) {
qCDebug(IMPORTWIZARD_LOG) << "Unable to load document.Parse error in line " << errorRow //FIXME qCDebug(IMPORTWIZARD_LOG) << "Unable to load document.Parse error in line " << errorRow
<< ", col " << errorCol << ": " << errorMsg; //<< ", col " << errorCol << ": " << errorMsg;
return false; return false;
} }
return true; return true;
......
...@@ -29,13 +29,9 @@ ...@@ -29,13 +29,9 @@
#include "autodetect/thunderbird/thunderbirdimportdata.h" #include "autodetect/thunderbird/thunderbirdimportdata.h"
#include "autodetect/sylpheed/sylpheedimportdata.h" #include "autodetect/sylpheed/sylpheedimportdata.h"
#include "autodetect/evolutionv3/evolutionv3importdata.h"
#include "autodetect/evolutionv2/evolutionv2importdata.h"
#include "autodetect/evolutionv1/evolutionv1importdata.h"
#include "autodetect/icedove/icedoveimportdata.h" #include "autodetect/icedove/icedoveimportdata.h"
#include "autodetect/oe/oeimportdata.h" #include "autodetect/oe/oeimportdata.h"
#include "autodetect/thebat/thebatimportdata.h" #include "autodetect/thebat/thebatimportdata.h"
//#include "autodetect/balsa/balsaimportdata.h"
#include "autodetect/claws-mail/clawsmailimportdata.h" #include "autodetect/claws-mail/clawsmailimportdata.h"
#include "manual/manualimportmailpage.h" #include "manual/manualimportmailpage.h"
...@@ -226,17 +222,17 @@ void ImportWizard::initializeImportModule() ...@@ -226,17 +222,17 @@ void ImportWizard::initializeImportModule()
importer->setImportWizard(this); importer->setImportWizard(this);
addImportModule(importer); addImportModule(importer);
importer = new Evolutionv3ImportData(this); // importer = new Evolutionv3ImportData(this);
importer->setImportWizard(this); // importer->setImportWizard(this);
addImportModule(importer); // addImportModule(importer);
importer = new Evolutionv2ImportData(this); // importer = new Evolutionv2ImportData(this);
importer->setImportWizard(this); // importer->setImportWizard(this);
addImportModule(importer); // addImportModule(importer);
importer = new Evolutionv1ImportData(this); // importer = new Evolutionv1ImportData(this);
importer->setImportWizard(this); // importer->setImportWizard(this);
addImportModule(importer); // addImportModule(importer);
// importer = new OperaImportData(this); // importer = new OperaImportData(this);
// importer->setImportWizard(this); // importer->setImportWizard(this);
......
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