[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdeconnect-kde] interfaces: Added some debug info to devices and notifications models
From: Albert Vaca <albertvaka () gmail ! com>
Date: 2014-06-30 23:26:17
Message-ID: E1X1kxl-0007lL-S9 () scm ! kde ! org
[Download RAW message or body]
Git commit 12411da360eb21a12c6e7461b32caa063b862eac by Albert Vaca.
Committed on 30/06/2014 at 23:25.
Pushed by albertvaka into branch 'master'.
Added some debug info to devices and notifications models
M +8 -4 interfaces/devicesmodel.cpp
M +6 -3 interfaces/notificationsmodel.cpp
http://commits.kde.org/kdeconnect-kde/12411da360eb21a12c6e7461b32caa063b862eac
diff --git a/interfaces/devicesmodel.cpp b/interfaces/devicesmodel.cpp
index ce9af3d..bef9db4 100644
--- a/interfaces/devicesmodel.cpp
+++ b/interfaces/devicesmodel.cpp
@@ -26,9 +26,10 @@
#include <KConfigGroup>
#include <KIcon>
-#include "kdebugnamespace.h"
+#include <core/kdebugnamespace.h>
+
+#include "dbusinterfaces.h"
// #include "modeltest.h"
-#include "interfaces/dbusinterfaces.h"
DevicesModel::DevicesModel(QObject *parent)
: QAbstractListModel(parent)
@@ -105,16 +106,19 @@ void DevicesModel::refreshDeviceList()
}
if (!m_dbusInterface->isValid()) {
+ kDebug(debugArea()) << "dbus interface not valid";
return;
}
-
bool onlyPaired = (m_displayFilter & StatusPaired);
bool onlyReachable = (m_displayFilter & StatusReachable);
QDBusPendingReply<QStringList> pendingDeviceIds = \
m_dbusInterface->devices(onlyReachable, onlyPaired); \
pendingDeviceIds.waitForFinished();
- if (pendingDeviceIds.isError()) return;
+ if (pendingDeviceIds.isError()) {
+ kDebug(debugArea()) << pendingDeviceIds.error();
+ return;
+ }
const QStringList& deviceIds = pendingDeviceIds.value();
Q_FOREACH(const QString& id, deviceIds) {
diff --git a/interfaces/notificationsmodel.cpp b/interfaces/notificationsmodel.cpp
index ea84fd6..7ff1638 100644
--- a/interfaces/notificationsmodel.cpp
+++ b/interfaces/notificationsmodel.cpp
@@ -26,8 +26,10 @@
#include <KConfigGroup>
#include <KIcon>
-#include "modeltest.h"
-#include "kdebugnamespace.h"
+#include <core/kdebugnamespace.h>
+
+//#include "modeltest.h"
+
NotificationsModel::NotificationsModel(QObject* parent)
: QAbstractListModel(parent)
@@ -110,12 +112,14 @@ void NotificationsModel::refreshNotificationList()
}
if (!m_dbusInterface->isValid()) {
+ kDebug(debugArea()) << "dbus interface not valid";
return;
}
QDBusPendingReply<QStringList> pendingNotificationIds = \
m_dbusInterface->activeNotifications(); pendingNotificationIds.waitForFinished();
if (pendingNotificationIds.isError()) {
+ kDebug(debugArea()) << pendingNotificationIds.error();
return;
}
const QStringList& notificationIds = pendingNotificationIds.value();
@@ -205,7 +209,6 @@ bool NotificationsModel::isAnyDimissable() const
return false;
}
-
void NotificationsModel::dismissAll()
{
Q_FOREACH (NotificationDbusInterface* notification, m_notificationList) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic