From a8c28a7ff1f5d968499e77834db0b220f1d26572 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Sun, 21 Jul 2019 13:28:06 +0200 Subject: [PATCH] smsapp: Offer the default avatar if another wasn't found --- smsapp/smshelper.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/smsapp/smshelper.cpp b/smsapp/smshelper.cpp index d21d9ee8f..e1e9173fc 100644 --- a/smsapp/smshelper.cpp +++ b/smsapp/smshelper.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -254,8 +255,8 @@ QIcon SmsHelper::getIconForAddresses(const QList& addresses if (personData) { icons.append(personData->photo()); } else { - // The contact is not known to KPeople - // TODO: Use generic icon from KPeople + static QString dummyAvatar = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("kf5/kpeople/dummy_avatar.png")); + icons.append(QPixmap(dummyAvatar)); } }