[SCM] kdeconnect packaging branch, master, updated. debian/0.9g-1-1183-g9d69498

Maximiliano Curia maxy at moszumanska.debian.org
Fri Oct 14 14:29:38 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kdeconnect.git;a=commitdiff;h=aefa51f

The following commit has been merged in the master branch:
commit aefa51fa8613cb3add5cbd783849781ac5e50a0e
Author: David Kahles <david.kahles96 at gmail.com>
Date:   Wed Apr 6 00:25:12 2016 +0200

    Remove notifications from plasmoid, if the notifications plugin gets disabled
    
    Therefore notify the client that we're deleting all notifications.
    Otherwise the client wouldn't notice this and the notifications would still
    be available in the plasmoid.
    
    REVIEW: 127582
---
 interfaces/notificationsmodel.cpp                    | 2 ++
 interfaces/notificationsmodel.h                      | 3 +--
 plugins/notifications/notificationsdbusinterface.cpp | 1 +
 plugins/notifications/notificationsdbusinterface.h   | 1 +
 4 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/interfaces/notificationsmodel.cpp b/interfaces/notificationsmodel.cpp
index 0844d03..3469cd5 100644
--- a/interfaces/notificationsmodel.cpp
+++ b/interfaces/notificationsmodel.cpp
@@ -87,6 +87,8 @@ void NotificationsModel::setDeviceId(const QString& deviceId)
             this, SLOT(notificationAdded(QString)));
     connect(m_dbusInterface, SIGNAL(notificationRemoved(QString)),
             this, SLOT(notificationRemoved(QString)));
+    connect(m_dbusInterface, SIGNAL(allNotificationsRemoved()),
+            this, SLOT(clearNotifications()));
 
     refreshNotificationList();
 
diff --git a/interfaces/notificationsmodel.h b/interfaces/notificationsmodel.h
index 0eb3a4d..83a9375 100644
--- a/interfaces/notificationsmodel.h
+++ b/interfaces/notificationsmodel.h
@@ -69,6 +69,7 @@ private Q_SLOTS:
     void notificationRemoved(const QString& id);
     void refreshNotificationList();
     void receivedNotifications(QDBusPendingCallWatcher* watcher);
+    void clearNotifications();
 
 Q_SIGNALS:
     void deviceIdChanged(const QString& value);
@@ -76,8 +77,6 @@ Q_SIGNALS:
     void rowsChanged();
 
 private:
-    void clearNotifications();
-
     DeviceNotificationsDbusInterface* m_dbusInterface;
     QList<NotificationDbusInterface*> m_notificationList;
     QString m_deviceId;
diff --git a/plugins/notifications/notificationsdbusinterface.cpp b/plugins/notifications/notificationsdbusinterface.cpp
index 2e9132b..6f55db0 100644
--- a/plugins/notifications/notificationsdbusinterface.cpp
+++ b/plugins/notifications/notificationsdbusinterface.cpp
@@ -52,6 +52,7 @@ void NotificationsDbusInterface::clearNotifications()
 {
     qDeleteAll(mNotifications);
     mNotifications.clear();
+    Q_EMIT allNotificationsRemoved();
 }
 
 QStringList NotificationsDbusInterface::activeNotifications()
diff --git a/plugins/notifications/notificationsdbusinterface.h b/plugins/notifications/notificationsdbusinterface.h
index fd36a10..ada6bb8 100644
--- a/plugins/notifications/notificationsdbusinterface.h
+++ b/plugins/notifications/notificationsdbusinterface.h
@@ -53,6 +53,7 @@ public Q_SLOTS:
 Q_SIGNALS:
     Q_SCRIPTABLE void notificationPosted(const QString& publicId);
     Q_SCRIPTABLE void notificationRemoved(const QString& publicId);
+    Q_SCRIPTABLE void allNotificationsRemoved();
 
 private /*methods*/:
     void removeNotification(const QString& internalId);

-- 
kdeconnect packaging



More information about the pkg-kde-commits mailing list