diff --git a/plugins/notifications/notification.cpp b/plugins/notifications/notification.cpp index 6d0483dde..3f4d29ff2 100644 --- a/plugins/notifications/notification.cpp +++ b/plugins/notifications/notification.cpp @@ -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; @@ -117,11 +118,11 @@ KNotification* Notification::createKNotification(bool update, const NetworkPacka connect(job, &FileTransferJob::result, this, &Notification::applyIconAndShow); } } - + if(!mRequestReplyId.isEmpty()) { mNotification->setActions( QStringList(i18n("Reply")) ); connect(mNotification, &KNotification::action1Activated, this, &Notification::reply); - } + } connect(mNotification, &KNotification::closed, this, &Notification::closed); @@ -151,4 +152,3 @@ void Notification::parseNetworkPackage(const NetworkPackage &np) mPayloadHash = np.get(QStringLiteral("payloadHash")); mRequestReplyId = np.get(QStringLiteral("requestReplyId"), QString()); } -