From kde-commits Mon Jun 30 23:26:17 2014 From: Albert Vaca Date: Mon, 30 Jun 2014 23:26:17 +0000 To: kde-commits Subject: [kdeconnect-kde] interfaces: Added some debug info to devices and notifications models Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=140417078718235 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/12411da360eb21a12c6e7461b32caa063b862= eac 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 #include = -#include "kdebugnamespace.h" +#include + +#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 =3D (m_displayFilter & StatusPaired); bool onlyReachable =3D (m_displayFilter & StatusReachable); = QDBusPendingReply pendingDeviceIds =3D m_dbusInterface->d= evices(onlyReachable, onlyPaired); pendingDeviceIds.waitForFinished(); - if (pendingDeviceIds.isError()) return; + if (pendingDeviceIds.isError()) { + kDebug(debugArea()) << pendingDeviceIds.error(); + return; + } = const QStringList& deviceIds =3D pendingDeviceIds.value(); Q_FOREACH(const QString& id, deviceIds) { diff --git a/interfaces/notificationsmodel.cpp b/interfaces/notificationsmo= del.cpp index ea84fd6..7ff1638 100644 --- a/interfaces/notificationsmodel.cpp +++ b/interfaces/notificationsmodel.cpp @@ -26,8 +26,10 @@ #include #include = -#include "modeltest.h" -#include "kdebugnamespace.h" +#include + +//#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 pendingNotificationIds =3D m_dbusInterf= ace->activeNotifications(); pendingNotificationIds.waitForFinished(); if (pendingNotificationIds.isError()) { + kDebug(debugArea()) << pendingNotificationIds.error(); return; } const QStringList& notificationIds =3D pendingNotificationIds.value(); @@ -205,7 +209,6 @@ bool NotificationsModel::isAnyDimissable() const return false; } = - void NotificationsModel::dismissAll() { Q_FOREACH (NotificationDbusInterface* notification, m_notificationList= ) {