Show no notification icon if there is no

Summary: I think it looks nicer than the kind of angry default icon and is the expected behaviour

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, apol, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D6089
This commit is contained in:
Nicolas Fella 2017-07-11 23:26:14 +02:00
parent 29888cb78b
commit 732462135f

View file

@ -102,7 +102,8 @@ KNotification* Notification::createKNotification(bool update, const NetworkPacka
}
if (!mHasIcon) {
mNotification->setIconName(QStringLiteral("preferences-desktop-notification"));
//HACK The only way to display no icon at all is trying to load a non-existant icon
mNotification->setIconName(QString("not_a_real_icon"));
show();
} else {
QString filename = mPayloadHash;
@ -151,4 +152,3 @@ void Notification::parseNetworkPackage(const NetworkPackage &np)
mPayloadHash = np.get<QString>(QStringLiteral("payloadHash"));
mRequestReplyId = np.get<QString>(QStringLiteral("requestReplyId"), QString());
}