Commit aa23a947 authored by Laurent Montel's avatar Laurent Montel 😁

Port to new debug categories

parent 3d026f9b
org.kde.pim.importwizard importwizard (importwizard)
org.kde.pim.importwizard.balsaplugin importwizard (balsa plugin)
org.kde.pim.importwizard.evolutionplugin importwizard (evolution v3 plugin)
......@@ -3,6 +3,7 @@ set(balsaimporter_SRCS
balsaimportdata.cpp
balsasettings.cpp
)
ecm_qt_declare_logging_category(balsaimporter_SRCS HEADER balsaplugin_debug.h IDENTIFIER BALSAPLUGIN_LOG CATEGORY_NAME org.kde.pim.importwizard.balsaplugin)
kcoreaddons_add_plugin(balsaimporterplugin JSON balsaimporter.json SOURCES
${balsaimporter_SRCS} INSTALL_NAMESPACE importwizard)
......
......@@ -29,7 +29,7 @@
#include <KLocalizedString>
#include <QUrl>
#include "importwizard_debug.h"
#include "balsaplugin_debug.h"
#include <QFile>
#include <QFileInfo>
#include <QRegularExpression>
......@@ -79,7 +79,7 @@ void BalsaAddressBook::readAddressBook(const KConfigGroup &grp)
ImportWizardUtil::mergeLdap(ldap);
addAddressBookImportInfo(i18n("Ldap created"));
} else if (type == QLatin1String("LibBalsaAddressBookGpe")) {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " Import it !";
qCDebug(BALSAPLUGIN_LOG) << " Import it !";
} else if (type == QLatin1String("LibBalsaAddressBookLdif")) {
const QString path = grp.readEntry(QStringLiteral("Path"));
if (!path.isEmpty()) {
......@@ -110,6 +110,6 @@ void BalsaAddressBook::readAddressBook(const KConfigGroup &grp)
addAddressBookImportInfo(i18n("New addressbook created: %1", createResource(QStringLiteral("akonadi_vcard_resource"), name, settings)));
}
} else {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " unknown addressbook type :" << type;
qCDebug(BALSAPLUGIN_LOG) << " unknown addressbook type :" << type;
}
}
......@@ -18,7 +18,7 @@
*/
#include "balsasettings.h"
#include "importwizard_debug.h"
#include "balsaplugin_debug.h"
#include <mailtransport/transportmanager.h>
#include "MailCommon/MailUtil"
#include "messageviewer/kxface.h"
......@@ -96,7 +96,7 @@ void BalsaSettings::readAccount(const KConfigGroup &grp, bool autoCheck, int aut
addCheckMailOnStartup(agentIdentifyName, autoCheck);
addToManualCheck(agentIdentifyName, check);
} else {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " unknown account type :" << type;
qCDebug(BALSAPLUGIN_LOG) << " unknown account type :" << type;
}
}
......@@ -164,7 +164,7 @@ void BalsaSettings::readTransport(const KConfigGroup &grp)
} else if (ssl == QLatin1String("false")) {
mt->setEncryption(MailTransport::Transport::EnumEncryption::None);
} else {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " unknown ssl value :" << ssl;
qCDebug(BALSAPLUGIN_LOG) << " unknown ssl value :" << ssl;
}
//TODO const QString anonymous = grp.readEntry(QStringLiteral("Anonymous"));
......
......@@ -5,6 +5,7 @@ set(evolutionv3importer_SRCS
evolutioncalendar.cpp
evolutionutil.cpp
)
ecm_qt_declare_logging_category(evolutionv3importer_SRCS HEADER evolutionv3plugin_debug.h IDENTIFIER EVOLUTIONPLUGIN_LOG CATEGORY_NAME org.kde.pim.importwizard.evolutionplugin)
kcoreaddons_add_plugin(evolutionv3importerplugin JSON evolutionv3importer.json SOURCES
${evolutionv3importer_SRCS} INSTALL_NAMESPACE importwizard)
......
......@@ -18,6 +18,7 @@
*/
#include "evolutionaddressbook.h"
#include "importwizard.h"
#include "evolutionv3plugin_debug.h"
#include <QProcess>
#include <KMessageBox>
#include <KLocalizedString>
......@@ -64,7 +65,7 @@ void EvolutionAddressBook::exportEvolutionAddressBook()
result = result.replace('\n', ',');
const QString value(result.trimmed());
const QStringList listAddressBook = value.split(QLatin1Char(','));
//qCDebug(IMPORTWIZARD_LOG)<<" listAddressBook"<<listAddressBook;
//qCDebug(EVOLUTIONPLUGIN_LOG)<<" listAddressBook"<<listAddressBook;
int i = 0;
QString name;
QString displayname;
......
......@@ -20,7 +20,7 @@
#include "evolutioncalendar.h"
#include "evolutionutil.h"
//#include "importwizard_debug.h"
#include "evolutionv3plugin_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)) {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " We can't open file" << filename;
qCDebug(EVOLUTIONPLUGIN_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()) {
//FIXME qCDebug(IMPORTWIZARD_LOG) << "No config found";
qCDebug(EVOLUTIONPLUGIN_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 {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " attr unknown " << attr;
qCDebug(EVOLUTIONPLUGIN_LOG) << " attr unknown " << attr;
}
}
}
......@@ -92,7 +92,7 @@ void EvolutionCalendar::extractCalendarInfo(const QString &info)
QDomElement domElement = cal.documentElement();
if (domElement.isNull()) {
//FIXME qCDebug(IMPORTWIZARD_LOG) << "Account not found";
qCDebug(EVOLUTIONPLUGIN_LOG) << "Account not found";
return;
}
QString base_uri;
......@@ -134,28 +134,28 @@ void EvolutionCalendar::extractCalendarInfo(const QString &info)
}
}
} else if (propertyName == QLatin1String("alarm")) {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " need to implement alarm property";
qCDebug(EVOLUTIONPLUGIN_LOG) << " need to implement alarm property";
} else {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " property unknown :" << propertyName;
qCDebug(EVOLUTIONPLUGIN_LOG) << " property unknown :" << propertyName;
}
}
} else {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " tag unknown :" << propertyTag;
qCDebug(EVOLUTIONPLUGIN_LOG) << " tag unknown :" << propertyTag;
}
}
}
LibImportWizard::AbstractBase::createResource(QStringLiteral("akonadi_ical_resource"), name, settings);
} else {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " tag unknown :" << tag;
qCDebug(EVOLUTIONPLUGIN_LOG) << " tag unknown :" << tag;
}
}
} else if (base_uri == QLatin1String("webcal://")) {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " need to implement webcal protocol";
qCDebug(EVOLUTIONPLUGIN_LOG) << " need to implement webcal protocol";
} else if (base_uri == QLatin1String("google://")) {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " need to implement google protocol";
qCDebug(EVOLUTIONPLUGIN_LOG) << " need to implement google protocol";
} else if (base_uri == QLatin1String("caldav://")) {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " need to implement caldav protocol";
qCDebug(EVOLUTIONPLUGIN_LOG) << " need to implement caldav protocol";
} else {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " base_uri unknown" << base_uri;
qCDebug(EVOLUTIONPLUGIN_LOG) << " base_uri unknown" << base_uri;
}
}
......@@ -26,7 +26,7 @@
#include <mailtransport/transportmanager.h>
//#include "importwizard_debug.h"
#include "evolutionv3plugin_debug.h"
#include <QFile>
#include <QDir>
......@@ -47,7 +47,7 @@ void EvolutionSettings::loadAccount(const QString &filename)
//Read gconf file
QFile file(filename);
if (!file.open(QIODevice::ReadOnly)) {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " We can't open file" << filename;
qCDebug(EVOLUTIONPLUGIN_LOG) << " We can't open file" << filename;
return;
}
QDomDocument doc;
......@@ -57,7 +57,7 @@ void EvolutionSettings::loadAccount(const QString &filename)
QDomElement config = doc.documentElement();
if (config.isNull()) {
//FIXME qCDebug(IMPORTWIZARD_LOG) << "No config found in filename " << filename;
qCDebug(EVOLUTIONPLUGIN_LOG) << "No config found in filename " << filename;
return;
}
for (QDomElement e = config.firstChildElement(); !e.isNull(); e = e.nextSiblingElement()) {
......@@ -74,7 +74,7 @@ void EvolutionSettings::loadAccount(const QString &filename)
} else if (attr == QLatin1String("send_recv_on_start")) {
//TODO: implement it.
} else {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " attr unknown " << attr;
qCDebug(EVOLUTIONPLUGIN_LOG) << " attr unknown " << attr;
}
}
}
......@@ -85,7 +85,7 @@ void EvolutionSettings::loadLdap(const QString &filename)
{
QFile file(filename);
if (!file.open(QIODevice::ReadOnly)) {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " We can't open file" << filename;
qCDebug(EVOLUTIONPLUGIN_LOG) << " We can't open file" << filename;
return;
}
QDomDocument doc;
......@@ -108,7 +108,7 @@ void EvolutionSettings::loadLdap(const QString &filename)
void EvolutionSettings::readLdap(const QString &ldapStr)
{
//FIXME qCDebug(IMPORTWIZARD_LOG) << " ldap " << ldapStr;
qCDebug(EVOLUTIONPLUGIN_LOG) << " ldap " << ldapStr;
QDomDocument ldap;
if (!EvolutionUtil::loadInDomDocument(ldapStr, ldap)) {
return;
......@@ -117,7 +117,7 @@ void EvolutionSettings::readLdap(const QString &ldapStr)
QDomElement domElement = ldap.documentElement();
if (domElement.isNull()) {
//FIXME qCDebug(IMPORTWIZARD_LOG) << "ldap not found";
qCDebug(EVOLUTIONPLUGIN_LOG) << "ldap not found";
return;
}
//Ldap server
......@@ -131,7 +131,7 @@ void EvolutionSettings::readLdap(const QString &ldapStr)
QUrl url(uri);
ldap.port = url.port();
ldap.ldapUrl = url;
//FIXME qCDebug(IMPORTWIZARD_LOG) << " relative_uri" << relative_uri;
qCDebug(EVOLUTIONPLUGIN_LOG) << " relative_uri" << relative_uri;
QDomElement propertiesElement = e.firstChildElement();
if (!propertiesElement.isNull()) {
......@@ -149,7 +149,7 @@ void EvolutionSettings::readLdap(const QString &ldapStr)
} else if (value == QLatin1String("whenever_possible")) {
ldap.useTLS = true;
} else {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " ssl attribute unknown" << value;
qCDebug(EVOLUTIONPLUGIN_LOG) << " ssl attribute unknown" << value;
}
} else if (propertyName == QLatin1String("limit")) {
ldap.limit = property.attribute(QStringLiteral("value")).toInt();
......@@ -164,15 +164,15 @@ void EvolutionSettings::readLdap(const QString &ldapStr)
} else if (value == QLatin1String("ldap/simple-binddn")) {
//TODO:
} else {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " Unknown auth value " << value;
qCDebug(EVOLUTIONPLUGIN_LOG) << " Unknown auth value " << value;
}
//FIXME qCDebug(IMPORTWIZARD_LOG) << " auth" << value;
qCDebug(EVOLUTIONPLUGIN_LOG) << " auth" << value;
} else {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " property unknown :" << propertyName;
qCDebug(EVOLUTIONPLUGIN_LOG) << " property unknown :" << propertyName;
}
}
} else {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " tag unknown :" << propertyTag;
qCDebug(EVOLUTIONPLUGIN_LOG) << " tag unknown :" << propertyTag;
}
}
ImportWizardUtil::mergeLdap(ldap);
......@@ -193,7 +193,7 @@ void EvolutionSettings::readSignatures(const QDomElement &account)
void EvolutionSettings::extractSignatureInfo(const QString &info)
{
////FIXME qCDebug(IMPORTWIZARD_LOG)<<" signature info "<<info;
//qCDebug(EVOLUTIONPLUGIN_LOG)<<" signature info "<<info;
QDomDocument signature;
if (!EvolutionUtil::loadInDomDocument(info, signature)) {
return;
......@@ -202,7 +202,7 @@ void EvolutionSettings::extractSignatureInfo(const QString &info)
QDomElement domElement = signature.documentElement();
if (domElement.isNull()) {
//FIXME qCDebug(IMPORTWIZARD_LOG) << "Signature not found";
qCDebug(EVOLUTIONPLUGIN_LOG) << "Signature not found";
return;
}
for (QDomElement e = domElement.firstChildElement(); !e.isNull(); e = e.nextSiblingElement()) {
......@@ -234,7 +234,7 @@ void EvolutionSettings::extractSignatureInfo(const QString &info)
}
mMapSignature.insert(uid, signature);
//FIXME qCDebug(IMPORTWIZARD_LOG) << " signature tag :" << tag;
qCDebug(EVOLUTIONPLUGIN_LOG) << " signature tag :" << tag;
}
}
......@@ -250,7 +250,7 @@ void EvolutionSettings::readAccount(const QDomElement &account)
void EvolutionSettings::extractAccountInfo(const QString &info)
{
//FIXME qCDebug(IMPORTWIZARD_LOG) << " info " << info;
qCDebug(EVOLUTIONPLUGIN_LOG) << " info " << info;
//Read QDomElement
QDomDocument account;
if (!EvolutionUtil::loadInDomDocument(info, account)) {
......@@ -260,7 +260,7 @@ void EvolutionSettings::extractAccountInfo(const QString &info)
QDomElement domElement = account.documentElement();
if (domElement.isNull()) {
//FIXME qCDebug(IMPORTWIZARD_LOG) << "Account not found";
qCDebug(EVOLUTIONPLUGIN_LOG) << "Account not found";
return;
}
......@@ -293,7 +293,7 @@ void EvolutionSettings::extractAccountInfo(const QString &info)
} else if (identityTag == QLatin1String("reply-to")) {
newIdentity->setReplyToAddr(identity.text());
} else {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " tag identity not found :" << identityTag;
qCDebug(EVOLUTIONPLUGIN_LOG) << " tag identity not found :" << identityTag;
}
}
} else if (tag == QLatin1String("source")) {
......@@ -311,14 +311,14 @@ void EvolutionSettings::extractAccountInfo(const QString &info)
for (QDomElement server = e.firstChildElement(); !server.isNull(); server = server.nextSiblingElement()) {
const QString serverTag = server.tagName();
if (serverTag == QLatin1String("url")) {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " server.text() :" << server.text();
qCDebug(EVOLUTIONPLUGIN_LOG) << " server.text() :" << server.text();
QUrl serverUrl(server.text());
const QString scheme = serverUrl.scheme();
QMap<QString, QVariant> settings;
const int port = serverUrl.port();
const QString path = serverUrl.path();
//FIXME qCDebug(IMPORTWIZARD_LOG) << " path !" << path;
qCDebug(EVOLUTIONPLUGIN_LOG) << " path !" << path;
const QString userName = serverUrl.userInfo();
const QStringList listArgument = path.split(QLatin1Char(';'));
......@@ -345,7 +345,7 @@ void EvolutionSettings::extractAccountInfo(const QString &info)
} else if (securityMethod == QLatin1String("ssl-on-alternate-port")) {
settings.insert(QStringLiteral("Safety"), QStringLiteral("SSL"));
} else {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " security method unknown : " << path;
qCDebug(EVOLUTIONPLUGIN_LOG) << " security method unknown : " << path;
}
} else {
settings.insert(QStringLiteral("Safety"), QStringLiteral("STARTTLS"));
......@@ -368,7 +368,7 @@ void EvolutionSettings::extractAccountInfo(const QString &info)
} else if (securityMethod == QLatin1String("ssl-on-alternate-port")) {
settings.insert(QStringLiteral("UseSSL"), true);
} else {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " security method unknown : " << path;
qCDebug(EVOLUTIONPLUGIN_LOG) << " security method unknown : " << path;
}
} else {
settings.insert(QStringLiteral("UseTLS"), true);
......@@ -399,12 +399,12 @@ void EvolutionSettings::extractAccountInfo(const QString &info)
LibImportWizard::AbstractBase::createResource(QStringLiteral("akonadi_maildir_resource"), name, settings);
} else if (scheme == QLatin1String("nntp")) {
//FIXME in the future
//FIXME qCDebug(IMPORTWIZARD_LOG) << " For the moment we can't import nntp resource";
qCDebug(EVOLUTIONPLUGIN_LOG) << " For the moment we can't import nntp resource";
} else {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " unknown scheme " << scheme;
qCDebug(EVOLUTIONPLUGIN_LOG) << " unknown scheme " << scheme;
}
} else {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " server tag unknown :" << serverTag;
qCDebug(EVOLUTIONPLUGIN_LOG) << " server tag unknown :" << serverTag;
}
}
} else if (tag == QLatin1String("transport")) {
......@@ -417,7 +417,7 @@ void EvolutionSettings::extractAccountInfo(const QString &info)
for (QDomElement smtp = e.firstChildElement(); !smtp.isNull(); smtp = smtp.nextSiblingElement()) {
const QString smtpTag = smtp.tagName();
if (smtpTag == QLatin1String("url")) {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " smtp.text() :" << smtp.text();
qCDebug(EVOLUTIONPLUGIN_LOG) << " smtp.text() :" << smtp.text();
QUrl smtpUrl(smtp.text());
const QString scheme = smtpUrl.scheme();
if (scheme != QLatin1String("sendmail")) {
......@@ -450,7 +450,7 @@ void EvolutionSettings::extractAccountInfo(const QString &info)
} else if (authMethod == QLatin1String("POPB4SMTP")) {
transport->setAuthenticationType(MailTransport::Transport::EnumAuthenticationType::APOP); //????
} else {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " smtp auth method unknown " << authMethod;
qCDebug(EVOLUTIONPLUGIN_LOG) << " smtp auth method unknown " << authMethod;
}
}
......@@ -465,14 +465,14 @@ void EvolutionSettings::extractAccountInfo(const QString &info)
} else if (securityMethod == QLatin1String("ssl-on-alternate-port")) {
transport->setEncryption(MailTransport::Transport::EnumEncryption::SSL);
} else {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " security method unknown : " << path;
qCDebug(EVOLUTIONPLUGIN_LOG) << " security method unknown : " << path;
}
} else {
transport->setEncryption(MailTransport::Transport::EnumEncryption::TLS);
}
}
} else {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " smtp tag unknown :" << smtpTag;
qCDebug(EVOLUTIONPLUGIN_LOG) << " smtp tag unknown :" << smtpTag;
}
}
storeTransport(transport, true);
......@@ -533,7 +533,7 @@ void EvolutionSettings::extractAccountInfo(const QString &info)
}
//TODO
} else {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " tag not know :" << tag;
qCDebug(EVOLUTIONPLUGIN_LOG) << " tag not know :" << tag;
}
}
......@@ -589,7 +589,7 @@ void EvolutionSettings::addAuth(QMap<QString, QVariant> &settings, const QString
} else if (authMethod == QLatin1String("POPB4SMTP")) {
settings.insert(argument, MailTransport::Transport::EnumAuthenticationType::APOP); //????
} else {
//FIXME qCDebug(IMPORTWIZARD_LOG) << " smtp auth method unknown " << authMethod;
qCDebug(EVOLUTIONPLUGIN_LOG) << " smtp auth method unknown " << authMethod;
}
}
}
......@@ -19,7 +19,7 @@
#include "evolutionutil.h"
//#include "importwizard_debug.h"
#include "evolutionv3plugin_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)) {
//FIXME qCDebug(IMPORTWIZARD_LOG) << "Unable to load document.Parse error in line " << errorRow
//<< ", col " << errorCol << ": " << errorMsg;
qCDebug(EVOLUTIONPLUGIN_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)) {
//FIXME qCDebug(IMPORTWIZARD_LOG) << "Unable to load document.Parse error in line " << errorRow
//<< ", col " << errorCol << ": " << errorMsg;
qCDebug(EVOLUTIONPLUGIN_LOG) << "Unable to load document.Parse error in line " << errorRow
<< ", col " << errorCol << ": " << errorMsg;
return false;
}
return true;
......
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