Commit 9231d7cd authored by Laurent Montel's avatar Laurent Montel 😁

Add debug categories for thunderbird plugin

parent ba25d6d8
...@@ -4,3 +4,4 @@ org.kde.pim.importwizard.evolutionplugin importwizard (evolution v3 plugin) ...@@ -4,3 +4,4 @@ org.kde.pim.importwizard.evolutionplugin importwizard (evolution v3 plugin)
org.kde.pim.importwizard.gearyplugin importwizard (geary plugin) org.kde.pim.importwizard.gearyplugin importwizard (geary plugin)
org.kde.pim.importwizard.operaplugin importwizard (opera plugin) org.kde.pim.importwizard.operaplugin importwizard (opera plugin)
org.kde.pim.importwizard.trojitaplugin importwizard (trojita plugin) org.kde.pim.importwizard.trojitaplugin importwizard (trojita plugin)
org.kde.pim.importwizard.thunderbirdplugin importwizard (thunderbird plugin)
...@@ -6,6 +6,7 @@ set(icedoveimporter_SRCS ...@@ -6,6 +6,7 @@ set(icedoveimporter_SRCS
) )
ecm_qt_declare_logging_category(icedoveimporter_SRCS HEADER thunderbirdplugin_debug.h IDENTIFIER THUNDERBIRDPLUGIN_LOG CATEGORY_NAME org.kde.pim.importwizard.thunderbirdplugin)
kcoreaddons_add_plugin(icedoveimporterplugin JSON icedoveimporter.json SOURCES kcoreaddons_add_plugin(icedoveimporterplugin JSON icedoveimporter.json SOURCES
${icedoveimporter_SRCS} INSTALL_NAMESPACE importwizard) ${icedoveimporter_SRCS} INSTALL_NAMESPACE importwizard)
......
...@@ -5,6 +5,7 @@ set(thunderbirdimporter_SRCS ...@@ -5,6 +5,7 @@ set(thunderbirdimporter_SRCS
addressbook/MorkParser.cpp addressbook/MorkParser.cpp
) )
ecm_qt_declare_logging_category(thunderbirdimporter_SRCS HEADER thunderbirdplugin_debug.h IDENTIFIER THUNDERBIRDPLUGIN_LOG CATEGORY_NAME org.kde.pim.importwizard.thunderbirdplugin)
kcoreaddons_add_plugin(thunderbirdimporterplugin JSON thunderbirdimporter.json SOURCES kcoreaddons_add_plugin(thunderbirdimporterplugin JSON thunderbirdimporter.json SOURCES
${thunderbirdimporter_SRCS} INSTALL_NAMESPACE importwizard) ${thunderbirdimporter_SRCS} INSTALL_NAMESPACE importwizard)
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <QIODevice> #include <QIODevice>
// ============================================================= // =============================================================
// MorkParser::MorkParser // MorkParser::MorkParser
#include "thunderbirdplugin_debug.h"
MorkParser::MorkParser(int DefaultScope) MorkParser::MorkParser(int DefaultScope)
{ {
...@@ -291,10 +292,10 @@ bool MorkParser::parseCell() ...@@ -291,10 +292,10 @@ bool MorkParser::parseCell()
if (!Text.isEmpty()) { if (!Text.isEmpty()) {
if (nowParsing_ == NPColumns) { if (nowParsing_ == NPColumns) {
mColumns[ ColumnId ] = Text; mColumns[ ColumnId ] = Text;
//qCDebug(IMPORTWIZARD_LOG)<<" column :"<<ColumnId<<" Text "<<Text; qCDebug(THUNDERBIRDPLUGIN_LOG)<<" column :"<<ColumnId<<" Text "<<Text;
} else { } else {
mValues[ ColumnId ] = Text; mValues[ ColumnId ] = Text;
//qCDebug(IMPORTWIZARD_LOG)<<" ColumnId "<<ColumnId<<" Value : "<<Text; qCDebug(THUNDERBIRDPLUGIN_LOG)<<" ColumnId "<<ColumnId<<" Value : "<<Text;
} }
} }
} else { } else {
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include <QTextStream> #include <QTextStream>
#include <QStringList> #include <QStringList>
#include <QFile> #include <QFile>
//#include "importwizard_debug.h" #include "thunderbirdplugin_debug.h"
#include <QStandardPaths> #include <QStandardPaths>
#include <QFileInfo> #include <QFileInfo>
#include <QDir> #include <QDir>
...@@ -51,7 +51,7 @@ void ThunderbirdSettings::importSettings() ...@@ -51,7 +51,7 @@ void ThunderbirdSettings::importSettings()
{ {
QFile file(mFileName); QFile file(mFileName);
if (!file.open(QIODevice::ReadOnly)) { if (!file.open(QIODevice::ReadOnly)) {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " We can't open file" << mFileName; qCDebug(THUNDERBIRDPLUGIN_LOG) << " We can't open file" << mFileName;
return; return;
} }
QTextStream stream(&file); QTextStream stream(&file);
...@@ -83,7 +83,7 @@ void ThunderbirdSettings::importSettings() ...@@ -83,7 +83,7 @@ void ThunderbirdSettings::importSettings()
line.startsWith(QStringLiteral("/*")) || line.startsWith(QStringLiteral("/*")) ||
line.startsWith(QStringLiteral(" */")) || line.startsWith(QStringLiteral(" */")) ||
line.startsWith(QStringLiteral(" *"))) { line.startsWith(QStringLiteral(" *"))) {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " unstored line :" << line; qCDebug(THUNDERBIRDPLUGIN_LOG) << " unstored line :" << line;
} }
} }
...@@ -205,7 +205,7 @@ void ThunderbirdSettings::readExtensionsSettings() ...@@ -205,7 +205,7 @@ void ThunderbirdSettings::readExtensionsSettings()
addKmailConfig(QStringLiteral("AutoResizeImage"), QStringLiteral("FilterRecipientType"), QStringLiteral("DontResizeOneEmailContainsPattern")); addKmailConfig(QStringLiteral("AutoResizeImage"), QStringLiteral("FilterRecipientType"), QStringLiteral("DontResizeOneEmailContainsPattern"));
break; break;
default: default:
//FIXME qCDebug(IMPORTWIZARD_LOG) << " unknown FilterRecipientType: " << filterRecipients; qCDebug(THUNDERBIRDPLUGIN_LOG) << " unknown FilterRecipientType: " << filterRecipients;
break; break;
} }
} }
...@@ -298,7 +298,7 @@ void ThunderbirdSettings::readTagSettings() ...@@ -298,7 +298,7 @@ void ThunderbirdSettings::readTagSettings()
void ThunderbirdSettings::readLdapSettings() void ThunderbirdSettings::readLdapSettings()
{ {
////FIXME qCDebug(IMPORTWIZARD_LOG)<<" mLdapAccountList:"<<mLdapAccountList; //qCDebug(THUNDERBIRDPLUGIN_LOG)<<" mLdapAccountList:"<<mLdapAccountList;
for (const QString &ldapAccountName : qAsConst(mLdapAccountList)) { for (const QString &ldapAccountName : qAsConst(mLdapAccountList)) {
ldapStruct ldap; ldapStruct ldap;
const QString ldapDescription = QStringLiteral("%1.description").arg(ldapAccountName); const QString ldapDescription = QStringLiteral("%1.description").arg(ldapAccountName);
...@@ -331,7 +331,7 @@ void ThunderbirdSettings::readLdapSettings() ...@@ -331,7 +331,7 @@ void ThunderbirdSettings::readLdapSettings()
} else if (ldap.ldapUrl.scheme() == QLatin1String("ldap")) { } else if (ldap.ldapUrl.scheme() == QLatin1String("ldap")) {
ldap.useSSL = false; ldap.useSSL = false;
} else { } else {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " Security not implemented :" << ldap.ldapUrl.scheme(); qCDebug(THUNDERBIRDPLUGIN_LOG) << " Security not implemented :" << ldap.ldapUrl.scheme();
} }
} }
ImportWizardUtil::mergeLdap(ldap); ImportWizardUtil::mergeLdap(ldap);
...@@ -583,7 +583,7 @@ void ThunderbirdSettings::addAuth(QMap<QString, QVariant> &settings, const QStri ...@@ -583,7 +583,7 @@ void ThunderbirdSettings::addAuth(QMap<QString, QVariant> &settings, const QStri
break; break;
case 4: //Encrypted password ??? case 4: //Encrypted password ???
settings.insert(argument, MailTransport::Transport::EnumAuthenticationType::LOGIN); //???? settings.insert(argument, MailTransport::Transport::EnumAuthenticationType::LOGIN); //????
//FIXME qCDebug(IMPORTWIZARD_LOG) << " authmethod == encrypt password"; qCDebug(THUNDERBIRDPLUGIN_LOG) << " authmethod == encrypt password";
break; break;
case 5: //GSSAPI case 5: //GSSAPI
settings.insert(argument, MailTransport::Transport::EnumAuthenticationType::GSSAPI); settings.insert(argument, MailTransport::Transport::EnumAuthenticationType::GSSAPI);
...@@ -592,14 +592,14 @@ void ThunderbirdSettings::addAuth(QMap<QString, QVariant> &settings, const QStri ...@@ -592,14 +592,14 @@ void ThunderbirdSettings::addAuth(QMap<QString, QVariant> &settings, const QStri
settings.insert(argument, MailTransport::Transport::EnumAuthenticationType::NTLM); settings.insert(argument, MailTransport::Transport::EnumAuthenticationType::NTLM);
break; break;
case 7: //TLS case 7: //TLS
//FIXME qCDebug(IMPORTWIZARD_LOG) << " authmethod method == TLS"; //???? qCDebug(THUNDERBIRDPLUGIN_LOG) << " authmethod method == TLS"; //????
break; break;
case 10: //OAuth2 verify it. case 10: //OAuth2 verify it.
settings.insert(argument, MailTransport::Transport::EnumAuthenticationType::XOAUTH2); settings.insert(argument, MailTransport::Transport::EnumAuthenticationType::XOAUTH2);
//FIXME qCDebug(IMPORTWIZARD_LOG) << " authmethod method == OAuth2"; //???? qCDebug(THUNDERBIRDPLUGIN_LOG) << " authmethod method == OAuth2"; //????
break; break;
default: default:
//FIXME qCDebug(IMPORTWIZARD_LOG) << " ThunderbirdSettings::addAuth unknown :" << authMethod; qCDebug(THUNDERBIRDPLUGIN_LOG) << " ThunderbirdSettings::addAuth unknown :" << authMethod;
break; break;
} }
} }
...@@ -662,7 +662,7 @@ void ThunderbirdSettings::readAccount() ...@@ -662,7 +662,7 @@ void ThunderbirdSettings::readAccount()
settings.insert(QStringLiteral("Safety"), QStringLiteral("SSL")); settings.insert(QStringLiteral("Safety"), QStringLiteral("SSL"));
break; break;
default: default:
//FIXME qCDebug(IMPORTWIZARD_LOG) << " socketType " << socketType; qCDebug(THUNDERBIRDPLUGIN_LOG) << " socketType " << socketType;
break; break;
} }
} }
...@@ -733,7 +733,7 @@ void ThunderbirdSettings::readAccount() ...@@ -733,7 +733,7 @@ void ThunderbirdSettings::readAccount()
settings.insert(QStringLiteral("UseSSL"), true); settings.insert(QStringLiteral("UseSSL"), true);
break; break;
default: default:
//FIXME qCDebug(IMPORTWIZARD_LOG) << " socketType " << socketType; qCDebug(THUNDERBIRDPLUGIN_LOG) << " socketType " << socketType;
break; break;
} }
} }
...@@ -761,17 +761,17 @@ void ThunderbirdSettings::readAccount() ...@@ -761,17 +761,17 @@ void ThunderbirdSettings::readAccount()
addToManualCheck(agentIdentifyName, true); addToManualCheck(agentIdentifyName, true);
} else if (type == QLatin1String("none")) { } else if (type == QLatin1String("none")) {
//FIXME look at if we can implement it //FIXME look at if we can implement it
//FIXME qCDebug(IMPORTWIZARD_LOG) << " account type none!"; qCDebug(THUNDERBIRDPLUGIN_LOG) << " account type none!";
} else if (type == QLatin1String("movemail")) { } else if (type == QLatin1String("movemail")) {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " movemail accound found and not implemented in importthunderbird"; qCDebug(THUNDERBIRDPLUGIN_LOG) << " movemail accound found and not implemented in importthunderbird";
} else if (type == QLatin1String("rss")) { } else if (type == QLatin1String("rss")) {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " rss resource needs to be implemented"; qCDebug(THUNDERBIRDPLUGIN_LOG) << " rss resource needs to be implemented";
continue; continue;
} else if (type == QLatin1String("nntp")) { } else if (type == QLatin1String("nntp")) {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " nntp resource need to be implemented"; qCDebug(THUNDERBIRDPLUGIN_LOG) << " nntp resource need to be implemented";
continue; continue;
} else { } else {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " type unknown : " << type; qCDebug(THUNDERBIRDPLUGIN_LOG) << " type unknown : " << type;
continue; continue;
} }
...@@ -832,7 +832,7 @@ void ThunderbirdSettings::readTransport() ...@@ -832,7 +832,7 @@ void ThunderbirdSettings::readTransport()
mt->setAuthenticationType(MailTransport::Transport::EnumAuthenticationType::NTLM); mt->setAuthenticationType(MailTransport::Transport::EnumAuthenticationType::NTLM);
break; break;
default: default:
//FIXME qCDebug(IMPORTWIZARD_LOG) << " authMethod unknown :" << authMethod; qCDebug(THUNDERBIRDPLUGIN_LOG) << " authMethod unknown :" << authMethod;
break; break;
} }
...@@ -848,7 +848,7 @@ void ThunderbirdSettings::readTransport() ...@@ -848,7 +848,7 @@ void ThunderbirdSettings::readTransport()
mt->setEncryption(MailTransport::Transport::EnumEncryption::SSL); mt->setEncryption(MailTransport::Transport::EnumEncryption::SSL);
break; break;
default: default:
//FIXME qCDebug(IMPORTWIZARD_LOG) << " trySsl unknown :" << trySsl; qCDebug(THUNDERBIRDPLUGIN_LOG) << " trySsl unknown :" << trySsl;
break; break;
} }
...@@ -1044,7 +1044,7 @@ void ThunderbirdSettings::insertIntoMap(const QString &line) ...@@ -1044,7 +1044,7 @@ void ThunderbirdSettings::insertIntoMap(const QString &line)
tag.name = mHashConfig.value(key).toString(); tag.name = mHashConfig.value(key).toString();
} }
mHashTag.insert(name, tag); mHashTag.insert(name, tag);
//FIXME qCDebug(IMPORTWIZARD_LOG) << " tag :" << name << " tag.name" << tag.name << " color :" << tag.color; qCDebug(THUNDERBIRDPLUGIN_LOG) << " tag :" << name << " tag.name" << tag.name << " color :" << tag.color;
} }
} }
......
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