smsapp: Offer the default avatar if another wasn't found
This commit is contained in:
parent
a7ee4ef0c5
commit
a8c28a7ff1
1 changed files with 3 additions and 2 deletions
|
@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue