Commit 81a0e8a8 authored by Laurent Montel's avatar Laurent Montel 😁

Port sylpheed/clawsmail to plugins

parent 3be1a091
......@@ -37,10 +37,10 @@ set(libimportwizard_autodetect_SRCS
autodetect/thunderbird/thunderbirdsettings.cpp
autodetect/thunderbird/thunderbirdaddressbook.cpp
autodetect/thunderbird/addressbook/MorkParser.cpp
autodetect/sylpheed/sylpheedimportdata.cpp
autodetect/sylpheed/sylpheedsettings.cpp
autodetect/sylpheed/sylpheedaddressbook.cpp
autodetect/sylpheed/sylpheedsettingsutils.cpp
# autodetect/sylpheed/sylpheedimportdata.cpp
# autodetect/sylpheed/sylpheedsettings.cpp
# autodetect/sylpheed/sylpheedaddressbook.cpp
# autodetect/sylpheed/sylpheedsettingsutils.cpp
# autodetect/evolutionv3/evolutionv3importdata.cpp
# autodetect/evolutionv3/evolutionsettings.cpp
# autodetect/evolutionv3/evolutioncalendar.cpp
......@@ -59,9 +59,9 @@ set(libimportwizard_autodetect_SRCS
# autodetect/balsa/balsaimportdata.cpp
# autodetect/balsa/balsasettings.cpp
# autodetect/balsa/balsaaddressbook.cpp
autodetect/claws-mail/clawsmailimportdata.cpp
autodetect/claws-mail/clawsmailsettings.cpp
autodetect/claws-mail/clawsmailaddressbook.cpp
# autodetect/claws-mail/clawsmailimportdata.cpp
# autodetect/claws-mail/clawsmailsettings.cpp
# autodetect/claws-mail/clawsmailaddressbook.cpp
# autodetect/trojita/trojitasettings.cpp
# autodetect/trojita/trojitaimportdata.cpp
# autodetect/trojita/trojitaaddressbook.cpp
......
......@@ -9,4 +9,6 @@ add_subdirectory(evolutionv2)
add_subdirectory(evolutionv3)
add_subdirectory(oe)
add_subdirectory(thebat)
add_subdirectory(sylpheed)
add_subdirectory(claws-mail)
set(clawsmailimporter_SRCS
clawsmailaddressbook.cpp
clawsmailimportdata.cpp
clawsmailsettings.cpp
../sylpheed/sylpheedaddressbook.cpp
../sylpheed/sylpheedsettings.cpp
../sylpheed/sylpheedsettingsutils.cpp
)
kcoreaddons_add_plugin(clawsmailimporterplugin JSON clawsmailimporter.json SOURCES
${clawsmailimporter_SRCS} INSTALL_NAMESPACE importwizard)
target_link_libraries(clawsmailimporterplugin
libimportwizard
KF5::XmlGui
KF5::I18n
KF5::Contacts
KF5::MailImporterAkonadi
KF5::MailTransport
KF5::IdentityManagement
KF5::MailCommon
)
......@@ -31,7 +31,7 @@
#include <QDir>
//K_PLUGIN_FACTORY_WITH_JSON(ClawsMailImporterFactory, "clawsmailimporter.json", registerPlugin<ClawsMailImportData>();)
K_PLUGIN_FACTORY_WITH_JSON(ClawsMailImporterFactory, "clawsmailimporter.json", registerPlugin<ClawsMailImportData>();)
ClawsMailImportData::ClawsMailImportData(QObject *parent, const QList<QVariant> &)
: AbstractImporter(parent)
......
......@@ -26,7 +26,7 @@
#include <KIdentityManagement/kidentitymanagement/identity.h>
#include <KIdentityManagement/kidentitymanagement/signature.h>
#include "importwizard_debug.h"
//#include "importwizard_debug.h"
#include <KConfig>
#include <KConfigGroup>
#include <QFileInfo>
......@@ -71,7 +71,7 @@ void ClawsMailSettings::importSettings(const QString &filename, const QString &p
QFile customHeaderFile(customheaderrc);
if (customHeaderFile.exists()) {
if (!customHeaderFile.open(QIODevice::ReadOnly)) {
qCDebug(IMPORTWIZARD_LOG) << " We can't open file" << customheaderrc;
//FIXME qCDebug(IMPORTWIZARD_LOG) << " We can't open file" << customheaderrc;
} else {
readCustomHeader(&customHeaderFile);
}
......
set(sylpheedimporter_SRCS
sylpheedaddressbook.cpp
sylpheedimportdata.cpp
sylpheedsettings.cpp
sylpheedsettingsutils.cpp
)
kcoreaddons_add_plugin(sylpheedimporterplugin JSON sylpheedimporter.json SOURCES
${sylpheedimporter_SRCS} INSTALL_NAMESPACE importwizard)
target_link_libraries(sylpheedimporterplugin
libimportwizard
KF5::XmlGui
KF5::I18n
KF5::Contacts
KF5::MailImporterAkonadi
KF5::MailTransport
KF5::IdentityManagement
KF5::MailCommon
)
......@@ -30,6 +30,8 @@
#include <kpluginfactory.h>
#include <QDir>
K_PLUGIN_FACTORY_WITH_JSON(SylpheedImporterFactory, "sylpheedimporter.json", registerPlugin<SylpheedImportData>();)
SylpheedImportData::SylpheedImportData(QObject *parent, const QList<QVariant> &)
: AbstractImporter(parent)
{
......@@ -105,3 +107,5 @@ AbstractImporter::TypeSupportedOptions SylpheedImportData::supportedOption()
options |= AbstractImporter::AddressBooks;
return options;
}
#include "sylpheedimportdata.moc"
......@@ -28,11 +28,9 @@
#include "importfinishpage.h"
#include "autodetect/thunderbird/thunderbirdimportdata.h"
#include "autodetect/sylpheed/sylpheedimportdata.h"
#include "autodetect/icedove/icedoveimportdata.h"
#include "autodetect/oe/oeimportdata.h"
#include "autodetect/thebat/thebatimportdata.h"
#include "autodetect/claws-mail/clawsmailimportdata.h"
#include "manual/manualimportmailpage.h"
#include "manual/manualselectfilterpage.h"
......@@ -218,9 +216,9 @@ void ImportWizard::initializeImportModule()
importer->setImportWizard(this);
addImportModule(importer);
importer = new SylpheedImportData(this);
importer->setImportWizard(this);
addImportModule(importer);
// importer = new SylpheedImportData(this);
// importer->setImportWizard(this);
// addImportModule(importer);
// importer = new Evolutionv3ImportData(this);
// importer->setImportWizard(this);
......@@ -262,9 +260,9 @@ void ImportWizard::initializeImportModule()
// importer->setImportWizard(this);
// addImportModule(importer);
importer = new ClawsMailImportData(this);
importer->setImportWizard(this);
addImportModule(importer);
// importer = new ClawsMailImportData(this);
// importer->setImportWizard(this);
// addImportModule(importer);
// importer = new TrojitaImportData(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