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

Convert to plugins

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