Commit 71bd8a11 authored by Laurent Montel's avatar Laurent Montel 😁

Port to qCDebug

parent 64618bd6
......@@ -15,4 +15,4 @@ log_kalarmdirresource kalarm directory resource (kdepim-runtime)
log_pop3resource pop3 resource (kdepim-runtime)
log_akonadi_serializer_kalarm akonadi serializer plugins (kdepim-runtime)
log_akonadi_serializer_mail akonadi mail plugins (kdepim-runtime)
log_resources_contacts contacts resource (kdepim-runtime)
......@@ -9,6 +9,7 @@ add_definitions(-DTRANSLATION_DOMAIN=\"akonadi_contacts_resource\")
set( contactsresource_SRCS
contactsresource.cpp
settingsdialog.cpp
contacts_resources_debug.cpp
)
ki18n_wrap_ui(contactsresource_SRCS settingsdialog.ui)
......
/* This file is part of the KDE project
Copyright (C) 2015 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "contacts_resources_debug.h"
Q_LOGGING_CATEGORY(CONTACTSRESOURCES_LOG, "log_resources_contacts")
/* This file is part of the KDE project
Copyright (C) 2015 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef CONTACTS_RESOURCES_DEBUG_H
#define CONTACTS_RESOURCES_DEBUG_H
#include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(CONTACTSRESOURCES_LOG)
#endif
......@@ -33,7 +33,7 @@
#include <itemfetchscope.h>
#include <kdbusconnectionpool.h>
#include <agentfactory.h>
#include <QDebug>
#include "contacts_resources_debug.h"
#include <KLocalizedString>
......@@ -271,7 +271,7 @@ void ContactsResource::itemAdded(const Akonadi::Item &item, const Akonadi::Colle
newItem.setRemoteId(group.id() + QLatin1String(".ctg"));
} else {
qWarning() << "got item without (usable) payload, ignoring it";
qCWarning(CONTACTSRESOURCES_LOG) << "got item without (usable) payload, ignoring it";
}
changeCommitted(newItem);
......@@ -521,13 +521,13 @@ Collection::Rights ContactsResource::supportedRights(bool isResourceCollection)
QString ContactsResource::directoryForCollection(const Collection &collection) const
{
if (collection.remoteId().isEmpty()) {
qWarning() << "Got incomplete ancestor chain:" << collection;
qCWarning(CONTACTSRESOURCES_LOG) << "Got incomplete ancestor chain:" << collection;
return QString();
}
if (collection.parentCollection() == Collection::root()) {
if (collection.remoteId() != baseDirectoryPath())
qWarning() << "RID mismatch, is " << collection.remoteId()
qCWarning(CONTACTSRESOURCES_LOG) << "RID mismatch, is " << collection.remoteId()
<< " expected " << baseDirectoryPath();
return collection.remoteId();
}
......
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