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

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


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

The following commit has been merged in the master branch:
commit 5d80bf9f235b8094a5a0296a2386cae553f80c0f
Author: Àlex Fiestas <afiestas at kde.org>
Date:   Mon Mar 7 11:34:41 2016 +0100

    If the package contains a photo, show it in the notification
    
    If the received packet has a photo, set it as pixmap in the
    notification, otherwise keep showing the icon.
    
    REVIEW:127298
---
 plugins/telephony/telephonyplugin.cpp | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/plugins/telephony/telephonyplugin.cpp b/plugins/telephony/telephonyplugin.cpp
index c774c41..449a22d 100644
--- a/plugins/telephony/telephonyplugin.cpp
+++ b/plugins/telephony/telephonyplugin.cpp
@@ -47,6 +47,7 @@ KNotification* TelephonyPlugin::createNotification(const NetworkPackage& np)
     const QString event = np.get<QString>("event");
     const QString phoneNumber = np.get<QString>("phoneNumber", i18n("unknown number"));
     const QString contactName = np.get<QString>("contactName", phoneNumber);
+    const QByteArray phoneThumbnail = QByteArray::fromBase64(np.get<QByteArray>("phoneThumbnail", ""));
 
     QString content, type, icon;
     KNotification::NotificationFlags flags = KNotification::CloseOnTimeout | KNotification::CloseWhenWidgetActivated;
@@ -83,7 +84,13 @@ KNotification* TelephonyPlugin::createNotification(const NetworkPackage& np)
     qCDebug(KDECONNECT_PLUGIN_TELEPHONY) << "Creating notification with type:" << type;
 
     KNotification* notification = new KNotification(type, flags, this);
-    notification->setIconName(icon);
+    if (!phoneThumbnail.isEmpty()) {
+        QPixmap photo;
+        photo.loadFromData(phoneThumbnail, "JPEG");
+        notification->setPixmap(photo);
+    } else {
+        notification->setIconName(icon);
+    }
     notification->setComponentName("kdeconnect");
     notification->setTitle(title);
     notification->setText(content);

-- 
kdeconnect packaging



More information about the pkg-kde-commits mailing list