smsapp: Offer the default avatar if another wasn't found

This commit is contained in:
Aleix Pol 2019-07-21 13:28:06 +02:00
parent a7ee4ef0c5
commit a8c28a7ff1

View file

@ -25,6 +25,7 @@
#include <QRegularExpression> #include <QRegularExpression>
#include <QString> #include <QString>
#include <QLoggingCategory> #include <QLoggingCategory>
#include <QStandardPaths>
#include <QHash> #include <QHash>
#include <KPeople/KPeople/PersonData> #include <KPeople/KPeople/PersonData>
@ -254,8 +255,8 @@ QIcon SmsHelper::getIconForAddresses(const QList<ConversationAddress>& addresses
if (personData) { if (personData) {
icons.append(personData->photo()); icons.append(personData->photo());
} else { } else {
// The contact is not known to KPeople static QString dummyAvatar = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("kf5/kpeople/dummy_avatar.png"));
// TODO: Use generic icon from KPeople icons.append(QPixmap(dummyAvatar));
} }
} }