mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-30 11:38:50 -07:00
Slight improvement of the notification code
This commit is contained in:
parent
c7314b99ea
commit
f379084b68
1 changed files with 3 additions and 1 deletions
|
@ -1107,8 +1107,10 @@ void MainWindow::showNotificationBaloon(QString title, QString msg) const {
|
||||||
"/org/freedesktop/Notifications",
|
"/org/freedesktop/Notifications",
|
||||||
QDBusConnection::sessionBus());
|
QDBusConnection::sessionBus());
|
||||||
if(notifications.isValid()) {
|
if(notifications.isValid()) {
|
||||||
|
QVariantMap hints;
|
||||||
|
hints["desktop-entry"] = "qBittorrent";
|
||||||
QDBusPendingReply<uint> reply = notifications.Notify("qBittorrent", 0, "qbittorrent", title,
|
QDBusPendingReply<uint> reply = notifications.Notify("qBittorrent", 0, "qbittorrent", title,
|
||||||
msg, QStringList(), QVariantMap(), -1);
|
msg, QStringList(), hints, -1);
|
||||||
reply.waitForFinished();
|
reply.waitForFinished();
|
||||||
if(!reply.isError())
|
if(!reply.isError())
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue