[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdepim-runtime] /: Port to qCDebug
From: Montel Laurent <montel () kde ! org>
Date: 2015-04-30 21:01:32
Message-ID: E1YnvaO-0001O4-Bu () scm ! kde ! org
[Download RAW message or body]
Git commit 71bd8a11a12dc2ec83467b787032305b5d3e7d0d by Montel Laurent.
Committed on 30/04/2015 at 21:01.
Pushed by mlaurent into branch 'master'.
Port to qCDebug
M +1 -1 kdepim-runtime.categories
M +1 -0 resources/contacts/CMakeLists.txt
A +23 -0 resources/contacts/contacts_resources_debug.cpp [License: LGPL \
(v2+)] A +27 -0 resources/contacts/contacts_resources_debug.h [License: \
LGPL (v2+)] M +4 -4 resources/contacts/contactsresource.cpp
http://commits.kde.org/kdepim-runtime/71bd8a11a12dc2ec83467b787032305b5d3e7d0d
diff --git a/kdepim-runtime.categories b/kdepim-runtime.categories
index 0fe9bf7..91b1e1a 100644
--- a/kdepim-runtime.categories
+++ b/kdepim-runtime.categories
@@ -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)
diff --git a/resources/contacts/CMakeLists.txt b/resources/contacts/CMakeLists.txt
index 92edde9..7495280 100644
--- a/resources/contacts/CMakeLists.txt
+++ b/resources/contacts/CMakeLists.txt
@@ -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)
diff --git a/resources/contacts/contacts_resources_debug.cpp \
b/resources/contacts/contacts_resources_debug.cpp new file mode 100644
index 0000000..64aaa1c
--- /dev/null
+++ b/resources/contacts/contacts_resources_debug.cpp
@@ -0,0 +1,23 @@
+/* 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")
+
+
diff --git a/resources/contacts/contacts_resources_debug.h \
b/resources/contacts/contacts_resources_debug.h new file mode 100644
index 0000000..ec03780
--- /dev/null
+++ b/resources/contacts/contacts_resources_debug.h
@@ -0,0 +1,27 @@
+/* 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
+
diff --git a/resources/contacts/contactsresource.cpp \
b/resources/contacts/contactsresource.cpp index 31c1648..3ebbd16 100644
--- a/resources/contacts/contactsresource.cpp
+++ b/resources/contacts/contactsresource.cpp
@@ -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();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic