[SCM] ktp-kded-integration-module packaging branch, master, updated. debian/15.12.1-2-382-gbd961c2

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:15:50 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-kded-module.git;a=commitdiff;h=4439bd4

The following commit has been merged in the master branch:
commit 4439bd4924900d1a49c2eb875dc1e90bbb32e955
Author: Hrvoje Senjan <hrvoje.senjan at gmail.com>
Date:   Tue Oct 28 19:54:20 2014 +0100

    Convert to QLoggingCategory
    
    REVIEW: 120864
---
 CMakeLists.txt              |  1 +
 autoaway.cpp                |  4 ++--
 autoconnect.h               |  9 +++++----
 contact-cache.cpp           |  8 ++++----
 contact-request-handler.cpp | 22 +++++++++++-----------
 contactnotify.cpp           |  1 -
 error-handler.cpp           |  1 -
 ktp_kded_debug.cpp          | 21 +++++++++++++++++++++
 ktp_kded_debug.h            | 26 ++++++++++++++++++++++++++
 screensaveraway.cpp         |  4 ++--
 telepathy-module.cpp        |  1 -
 telepathy-mpris.cpp         | 18 +++++++++---------
 12 files changed, 81 insertions(+), 35 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index fef3f0d..4a8aa41 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,6 +34,7 @@ include_directories (${CMAKE_CURRENT_BINARY_DIR}
 )
 
 set (kded_ktp_integration_module_SRCS
+     ktp_kded_debug.cpp
      contact-cache.cpp
      contact-request-handler.cpp
      telepathy-kded-module-plugin.cpp
diff --git a/autoaway.cpp b/autoaway.cpp
index 8250731..4881c71 100644
--- a/autoaway.cpp
+++ b/autoaway.cpp
@@ -18,10 +18,10 @@
 */
 
 #include "autoaway.h"
+#include "ktp_kded_debug.h"
 
 #include <KTp/global-presence.h>
 
-#include <KDebug>
 #include <KIdleTime>
 #include <KConfig>
 #include <KSharedConfig>
@@ -76,7 +76,7 @@ void AutoAway::timeoutReached(int id)
 
 void AutoAway::backFromIdle()
 {
-    kDebug();
+    qCDebug(KTP_KDED_MODULE);
     setActive(false);
 }
 
diff --git a/autoconnect.h b/autoconnect.h
index 9af58e7..0f3ab13 100644
--- a/autoconnect.h
+++ b/autoconnect.h
@@ -20,8 +20,9 @@
 #ifndef AUTOCONNECT_H
 #define AUTOCONNECT_H
 
+#include <QDebug>
+
 #include <KConfigGroup>
-#include <KDebug>
 
 #include <TelepathyQt/Presence>
 
@@ -62,8 +63,8 @@ public:
         case AutoConnect::Manual:
             return QString::fromLatin1("manual");
         default:
-            kWarning() << "Got not recognized mode: '" << mode << "'.";
-            kWarning() << "Treat as AutoConnect::Manual (" << AutoConnect::Manual << ").";
+            qWarning() << "Got not recognized mode: '" << mode << "'.";
+            qWarning() << "Treat as AutoConnect::Manual (" << AutoConnect::Manual << ").";
             return QString::fromLatin1("manual");
         }
     }
@@ -84,7 +85,7 @@ public:
         } else if (mode == modeToString(AutoConnect::Manual)) {
             return AutoConnect::Manual;
         } else {
-            kWarning() << "Got not recognized string: '" << mode << "'. Treat as 'manual'";
+            qWarning() << "Got not recognized string: '" << mode << "'. Treat as 'manual'";
             return AutoConnect::Manual;
         }
     }
diff --git a/contact-cache.cpp b/contact-cache.cpp
index 2c2124c..a06ad30 100644
--- a/contact-cache.cpp
+++ b/contact-cache.cpp
@@ -18,6 +18,7 @@
 */
 
 #include "contact-cache.h"
+#include "ktp_kded_debug.h"
 
 #include <KTp/core.h>
 #include <KTp/contact.h>
@@ -30,7 +31,6 @@
 #include <TelepathyQt/PendingOperation>
 #include <TelepathyQt/PendingReady>
 
-#include <KDebug>
 #include <KGlobal>
 #include <KStandardDirs>
 
@@ -78,8 +78,8 @@ ContactCache::ContactCache(QObject *parent):
 void ContactCache::onAccountManagerReady(Tp::PendingOperation *op)
 {
     if (!op || op->isError()) {
-        kWarning() << "ContactCache: Failed to initialize AccountManager:" << op->errorName();
-        kWarning() << op->errorMessage();
+        qCWarning(KTP_KDED_MODULE) << "ContactCache: Failed to initialize AccountManager:" << op->errorName();
+        qCWarning(KTP_KDED_MODULE) << op->errorMessage();
 
         return;
     }
@@ -259,7 +259,7 @@ void ContactCache::checkContactManagerState(const Tp::ContactManagerPtr &contact
         if (!account.isNull()) {
             syncContactsOfAccount(account);
         } else {
-            kWarning() << "Can't access to account by contactManager";
+            qCWarning(KTP_KDED_MODULE) << "Can't access to account by contactManager";
         }
     }
 }
diff --git a/contact-request-handler.cpp b/contact-request-handler.cpp
index 2d3239e..de25328 100644
--- a/contact-request-handler.cpp
+++ b/contact-request-handler.cpp
@@ -19,6 +19,7 @@
 
 
 #include "contact-request-handler.h"
+#include "ktp_kded_debug.h"
 
 #include <KTp/error-dictionary.h>
 #include <KTp/contact-info-dialog.h>
@@ -32,7 +33,6 @@
 #include <TelepathyQt/PendingComposite>
 #include <TelepathyQt/PendingOperation>
 
-#include <KDebug>
 #include <KGlobal>
 #include <KAboutData>
 #include <KMenu>
@@ -71,7 +71,7 @@ ContactRequestHandler::~ContactRequestHandler()
 
 void ContactRequestHandler::onNewAccountAdded(const Tp::AccountPtr &account)
 {
-    kWarning();
+    qCWarning(KTP_KDED_MODULE);
     Q_ASSERT(account->isReady(Tp::Account::FeatureCore));
 
     if (account->connection()) {
@@ -92,7 +92,7 @@ void ContactRequestHandler::onConnectionChanged(const Tp::ConnectionPtr &connect
 
 void ContactRequestHandler::handleNewConnection(const Tp::ConnectionPtr &connection)
 {
-    kDebug();
+    qCDebug(KTP_KDED_MODULE);
     connect(connection->contactManager().data(), SIGNAL(presencePublicationRequested(Tp::Contacts)),
             this, SLOT(onPresencePublicationRequested(Tp::Contacts)));
 
@@ -118,19 +118,19 @@ void ContactRequestHandler::onContactManagerStateChanged(const Tp::ContactManage
         watcher->setFuture(QtConcurrent::filtered(contactManager->allKnownContacts(),
                                                   kde_tp_filter_contacts_by_publication_status));
 
-        kDebug() << "Watcher is on";
+        qCDebug(KTP_KDED_MODULE) << "Watcher is on";
     } else {
-        kDebug() << "Watcher still off, state is" << state << "contactManager is" << contactManager.isNull();
+        qCDebug(KTP_KDED_MODULE) << "Watcher still off, state is" << state << "contactManager is" << contactManager.isNull();
     }
 }
 
 void ContactRequestHandler::onAccountsPresenceStatusFiltered()
 {
-    kDebug() << "Watcher is here";
+    qCDebug(KTP_KDED_MODULE) << "Watcher is here";
     QFutureWatcher< Tp::ContactPtr > *watcher = dynamic_cast< QFutureWatcher< Tp::ContactPtr > * >(sender());
-    kDebug() << "Watcher is casted";
+    qCDebug(KTP_KDED_MODULE) << "Watcher is casted";
     Tp::Contacts contacts = watcher->future().results().toSet();
-    kDebug() << "Watcher is used";
+    qCDebug(KTP_KDED_MODULE) << "Watcher is used";
     if (!contacts.isEmpty()) {
         onPresencePublicationRequested(contacts);
     }
@@ -139,7 +139,7 @@ void ContactRequestHandler::onAccountsPresenceStatusFiltered()
 
 void ContactRequestHandler::onPresencePublicationRequested(const Tp::Contacts &contacts)
 {
-    kDebug() << "New contact requested";
+    qCDebug(KTP_KDED_MODULE) << "New contact requested";
 
     Q_FOREACH (const Tp::ContactPtr &contact, contacts) {
         Tp::ContactManagerPtr manager = contact->manager();
@@ -401,7 +401,7 @@ void ContactRequestHandler::updateMenus()
         m_notifierItem.data()->setContextMenu(notifierMenu);
     }
 
-    kDebug() << m_pendingContacts.keys();
+    qCDebug(KTP_KDED_MODULE) << m_pendingContacts.keys();
 
     //add members in pending contacts not in the menu to the menu.
     QHash<QString, Tp::ContactPtr>::const_iterator i;
@@ -411,7 +411,7 @@ void ContactRequestHandler::updateMenus()
             continue;
         }
 
-        kDebug();
+        qCDebug(KTP_KDED_MODULE);
         Tp::ContactPtr contact = i.value();
 
         KMenu *contactMenu = new KMenu(m_notifierItem.data()->contextMenu());
diff --git a/contactnotify.cpp b/contactnotify.cpp
index fdd25b0..c1d259f 100644
--- a/contactnotify.cpp
+++ b/contactnotify.cpp
@@ -29,7 +29,6 @@
 #include <KSharedConfig>
 #include <KConfigGroup>
 #include <KLocalizedString>
-#include <KDebug>
 #include <KNotification>
 
 ContactNotify::ContactNotify(QObject *parent) :
diff --git a/error-handler.cpp b/error-handler.cpp
index cb0fbb6..1787e7e 100644
--- a/error-handler.cpp
+++ b/error-handler.cpp
@@ -29,7 +29,6 @@
 
 #include <KLocalizedString>
 #include <KNotification>
-#include <KDebug>
 
 #include <Solid/Networking>
 
diff --git a/ktp_kded_debug.cpp b/ktp_kded_debug.cpp
new file mode 100644
index 0000000..3fb94dc
--- /dev/null
+++ b/ktp_kded_debug.cpp
@@ -0,0 +1,21 @@
+/*  This file is part of the KDE project
+    Copyright (C) 2014 Hrvoje Senjan <hrvoje.senjan at gmail.com>
+
+    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 "ktp_kded_debug.h"
+Q_LOGGING_CATEGORY(KTP_KDED_MODULE, "ktp-kded-module")
\ No newline at end of file
diff --git a/ktp_kded_debug.h b/ktp_kded_debug.h
new file mode 100644
index 0000000..a5300df
--- /dev/null
+++ b/ktp_kded_debug.h
@@ -0,0 +1,26 @@
+/*  This file is part of the KDE project
+    Copyright (C) 2014 Hrvoje Senjan <hrvoje.senjan at gmail.com>
+
+    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 KTP_KDED_DEBUG_H
+#define KTP_KDED_DEBUG_H
+
+#include <QLoggingCategory>
+Q_DECLARE_LOGGING_CATEGORY(KTP_KDED_MODULE)
+
+#endif
\ No newline at end of file
diff --git a/screensaveraway.cpp b/screensaveraway.cpp
index b6a0268..f226564 100644
--- a/screensaveraway.cpp
+++ b/screensaveraway.cpp
@@ -18,10 +18,10 @@
 */
 
 #include "screensaveraway.h"
+#include "ktp_kded_debug.h"
 
 #include <KTp/global-presence.h>
 
-#include <KDebug>
 #include <KSharedConfig>
 #include <KConfig>
 #include <KConfigGroup>
@@ -63,7 +63,7 @@ void ScreenSaverAway::onActiveChanged(bool newState)
         setRequestedPresence(Tp::Presence::away(m_screenSaverAwayMessage));
         setActive(true);
     } else {
-        kDebug();
+        qCDebug(KTP_KDED_MODULE);
         setActive(false);
     }
 }
diff --git a/telepathy-module.cpp b/telepathy-module.cpp
index 3c34b6e..8489ff8 100644
--- a/telepathy-module.cpp
+++ b/telepathy-module.cpp
@@ -34,7 +34,6 @@
 #include <TelepathyQt/Debug>
 
 #include <KConfigGroup>
-#include <KDebug>
 #include <KPluginFactory>
 
 K_PLUGIN_FACTORY(TelepathyModuleFactory, registerPlugin<TelepathyModule>(); )
diff --git a/telepathy-mpris.cpp b/telepathy-mpris.cpp
index 44b041f..ee0e622 100644
--- a/telepathy-mpris.cpp
+++ b/telepathy-mpris.cpp
@@ -18,11 +18,11 @@
 */
 
 #include "telepathy-mpris.h"
+#include "ktp_kded_debug.h"
 
 #include <KTp/global-presence.h>
 
 #include <KConfigGroup>
-#include <KDebug>
 #include <KLocalizedString>
 #include <KSharedConfig>
 
@@ -95,7 +95,7 @@ void TelepathyMPRIS::serviceNameFetchFinished(QDBusPendingCallWatcher *callWatch
 {
     QDBusPendingReply<QStringList> reply = *callWatcher;
     if (reply.isError()) {
-        kDebug() << reply.error();
+        qCDebug(KTP_KDED_MODULE) << reply.error();
         return;
     }
 
@@ -113,7 +113,7 @@ void TelepathyMPRIS::serviceNameFetchFinished(QDBusPendingCallWatcher *callWatch
     }
 
     if (m_watchedPlayers.isEmpty()) {
-        kDebug() << "Received empty players list while active, deactivating (player quit)";
+        qCDebug(KTP_KDED_MODULE) << "Received empty players list while active, deactivating (player quit)";
         m_lastReceivedMetadata.clear();
         m_playbackActive = false;
         if (isActive()) {
@@ -147,7 +147,7 @@ void TelepathyMPRIS::reloadConfig()
 
 void TelepathyMPRIS::watchPlayer(const QString &service)
 {
-    kDebug() << "Found mpris service:" << service;
+    qCDebug(KTP_KDED_MODULE) << "Found mpris service:" << service;
     requestPlaybackStatus(service);
 
     //check if we are already watching this service
@@ -181,11 +181,11 @@ void TelepathyMPRIS::serviceOwnerChanged(const QString &serviceName, const QStri
     if (serviceName.startsWith(mprisServicePrefix)) {
         if (!newOwner.isEmpty()) {
             //if we have newOwner, we have new player registered at dbus
-            kDebug() << "New player appeared on dbus, connecting...";
+            qCDebug(KTP_KDED_MODULE) << "New player appeared on dbus, connecting...";
             watchPlayer(serviceName);
         } else if (newOwner.isEmpty()) {
             //if there's no owner, the player quit, look if there are any other players
-            kDebug() << "Player disappeared from dbus, looking for other players...";
+            qCDebug(KTP_KDED_MODULE) << "Player disappeared from dbus, looking for other players...";
             detectPlayers();
         }
     }
@@ -193,13 +193,13 @@ void TelepathyMPRIS::serviceOwnerChanged(const QString &serviceName, const QStri
 
 void TelepathyMPRIS::onActivateNowPlaying()
 {
-    kDebug() << "Plugin activated";
+    qCDebug(KTP_KDED_MODULE) << "Plugin activated";
     activatePlugin(true);
 }
 
 void TelepathyMPRIS::onDeactivateNowPlaying()
 {
-    kDebug() << "Plugin deactivated on contact list request";
+    qCDebug(KTP_KDED_MODULE) << "Plugin deactivated on contact list request";
     activatePlugin(false);
 }
 
@@ -207,7 +207,7 @@ void TelepathyMPRIS::onPlaybackStatusReceived(QDBusPendingCallWatcher *watcher)
 {
     QDBusPendingReply<QVariantMap> reply = *watcher;
     if (reply.isError()) {
-        kWarning() << "Received error reply from DBus" << reply.error();
+        qCWarning(KTP_KDED_MODULE) << "Received error reply from DBus" << reply.error();
     } else {
         QVariantMap replyData = reply.value();
         setPlaybackStatus(replyData);

-- 
ktp-kded-integration-module packaging



More information about the pkg-kde-commits mailing list