[SCM] ktp-common-internals packaging branch, master, updated. debian/15.12.1-2-1839-gf0635e9

Maximiliano Curia maxy at moszumanska.debian.org
Mon May 9 09:08:43 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=8372e36

The following commit has been merged in the master branch:
commit 8372e362e6c96f69efc1a0e056237c166d74763f
Author: Aleix Pol <aleixpol at kde.org>
Date:   Fri Feb 13 16:31:37 2015 +0100

    Make Conversation::avatar more resistant
    
    If QIcon receives the cached image but still isn't usable, then provide
    the fallback as well.
---
 KTp/Declarative/conversation.cpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/KTp/Declarative/conversation.cpp b/KTp/Declarative/conversation.cpp
index 325b542..5f752a1 100644
--- a/KTp/Declarative/conversation.cpp
+++ b/KTp/Declarative/conversation.cpp
@@ -128,10 +128,12 @@ QIcon Conversation::avatar() const
     } else {
         const QString path = d->targetContact->avatarData().fileName;
         QIcon icon;
-        if (path.isEmpty()) {
-            icon = QIcon::fromTheme(QStringLiteral("im-user"));
-        } else
+        if (!path.isEmpty()) {
             icon = QIcon(path);
+        }
+        if (icon.availableSizes().isEmpty()) {
+            icon = QIcon::fromTheme(QStringLiteral("im-user"));
+        }
         return icon;
     }
 }

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list