Commit 0034e411 authored by Laurent Montel's avatar Laurent Montel 😁

Convert to plugin this one too

parent d64ba1b1
......@@ -48,9 +48,9 @@ set(libimportwizard_autodetect_SRCS
autodetect/evolutionv3/evolutionutil.cpp
autodetect/evolutionv2/evolutionv2importdata.cpp
autodetect/evolutionv1/evolutionv1importdata.cpp
autodetect/opera/operaimportdata.cpp
autodetect/opera/operaaddressbook.cpp
autodetect/opera/operasettings.cpp
# autodetect/opera/operaimportdata.cpp
# autodetect/opera/operaaddressbook.cpp
# autodetect/opera/operasettings.cpp
autodetect/oe/oeimportdata.cpp
autodetect/mailapp/mailappimportdata.cpp
autodetect/pmail/pmailimportdata.cpp
......
add_subdirectory(geary)
add_subdirectory(trojita)
add_subdirectory(opera)
set(operaimporter_SRCS
operaaddressbook.cpp
operaimportdata.cpp
operasettings.cpp
)
kcoreaddons_add_plugin(operaimporterplugin JSON operaimporter.json SOURCES
${operaimporter_SRCS} INSTALL_NAMESPACE importwizard)
target_link_libraries(operaimporterplugin
libimportwizard
KF5::XmlGui
KF5::I18n
KF5::Contacts
KF5::MailImporterAkonadi
KF5::MailTransport
KF5::IdentityManagement
)
......@@ -21,7 +21,7 @@
#include <KContacts/Addressee>
#include <QUrl>
#include "importwizard_debug.h"
//#include "importwizard_debug.h"
#include <QFile>
OperaAddressBook::OperaAddressBook(const QString &filename, ImportWizard *parent)
......@@ -34,7 +34,7 @@ void OperaAddressBook::importAddressBook()
{
QFile file(mFileName);
if (!file.open(QIODevice::ReadOnly)) {
qCDebug(IMPORTWIZARD_LOG) << " We can't open file" << mFileName;
//FIXME qCDebug(IMPORTWIZARD_LOG) << " We can't open file" << mFileName;
return;
}
......
......@@ -29,6 +29,8 @@
#include <kpluginfactory.h>
#include <QDir>
K_PLUGIN_FACTORY_WITH_JSON(OperaImporterFactory, "operaimporter.json", registerPlugin<OperaImportData>();)
OperaImportData::OperaImportData(QObject *parent, const QList<QVariant> &)
: AbstractImporter(parent)
{
......@@ -93,3 +95,5 @@ AbstractImporter::TypeSupportedOptions OperaImportData::supportedOption()
options |= AbstractImporter::Settings;
return options;
}
#include "operaimportdata.moc"
......@@ -18,7 +18,7 @@
*/
#include "operasettings.h"
#include "importwizard_debug.h"
//#include "importwizard_debug.h"
#include "mailimporter/filteropera.h"
#include <mailtransport/transportmanager.h>
......@@ -116,7 +116,7 @@ void OperaSettings::readAccount(const KConfigGroup &grp)
} else if (leaveOnServer == 0) {
settings.insert(QStringLiteral("LeaveOnServer"), false);
} else {
qCDebug(IMPORTWIZARD_LOG) << " leave on server option unknown : " << leaveOnServer;
//FIXME qCDebug(IMPORTWIZARD_LOG) << " leave on server option unknown : " << leaveOnServer;
}
const int removeMailFromSever = grp.readEntry(QStringLiteral("Remove From Server Delay Enabled"), -1);
......@@ -164,7 +164,7 @@ void OperaSettings::readAccount(const KConfigGroup &grp)
settings.insert(QStringLiteral("AuthenticationMethod"), MailTransport::Transport::EnumAuthenticationType::APOP); //TODO: verify
break;
default:
qCDebug(IMPORTWIZARD_LOG) << " unknown authentication method :" << authMethod;
//FIXME qCDebug(IMPORTWIZARD_LOG) << " unknown authentication method :" << authMethod;
break;
}
......@@ -173,7 +173,7 @@ void OperaSettings::readAccount(const KConfigGroup &grp)
addCheckMailOnStartup(agentIdentifyName, enableManualCheck);
addToManualCheck(agentIdentifyName, enableManualCheck);
} else {
qCDebug(IMPORTWIZARD_LOG) << " protocol unknown : " << incomingProtocol;
//FIXME qCDebug(IMPORTWIZARD_LOG) << " protocol unknown : " << incomingProtocol;
}
}
......@@ -219,7 +219,8 @@ void OperaSettings::readTransport(const KConfigGroup &grp)
mt->setAuthenticationType(MailTransport::Transport::EnumAuthenticationType::PLAIN); //Don't know... Verify
break;
default:
qCDebug(IMPORTWIZARD_LOG) << " authMethod unknown :" << authMethod;
//FIXME qCDebug(IMPORTWIZARD_LOG) << " authMethod unknown :" << authMethod;
;
}
//We can't specify a default smtp...
......@@ -280,7 +281,7 @@ void OperaSettings::readIdentity(const KConfigGroup &grp)
signature.setText(QString(sigText));
break;
default:
qCDebug(IMPORTWIZARD_LOG) << " pb with Signature is HTML " << signatureHtml;
//FIXME qCDebug(IMPORTWIZARD_LOG) << " pb with Signature is HTML " << signatureHtml;
break;
}
newIdentity->setSignature(signature);
......
......@@ -33,7 +33,6 @@
#include "autodetect/evolutionv2/evolutionv2importdata.h"
#include "autodetect/evolutionv1/evolutionv1importdata.h"
#include "autodetect/icedove/icedoveimportdata.h"
#include "autodetect/opera/operaimportdata.h"
#include "autodetect/oe/oeimportdata.h"
#include "autodetect/mailapp/mailappimportdata.h"
#include "autodetect/pmail/pmailimportdata.h"
......@@ -241,9 +240,9 @@ void ImportWizard::initializeImportModule()
importer->setImportWizard(this);
addImportModule(importer);
importer = new OperaImportData(this);
importer->setImportWizard(this);
addImportModule(importer);
// importer = new OperaImportData(this);
// importer->setImportWizard(this);
// addImportModule(importer);
#ifdef Q_OS_WIN
importer = new OeImportData(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