Changeset View
Changeset View
Standalone View
Standalone View
src/lib/notifications/desktopnotificationsfactory.cpp
Show First 20 Lines • Show All 84 Lines • ▼ Show 20 Line(s) | 76 | case PopupWidget: | |||
---|---|---|---|---|---|
85 | m_desktopNotif.data()->show(); | 85 | m_desktopNotif.data()->show(); | ||
86 | break; | 86 | break; | ||
87 | case DesktopNative: | 87 | case DesktopNative: | ||
88 | #if defined(Q_OS_UNIX) && !defined(DISABLE_DBUS) | 88 | #if defined(Q_OS_UNIX) && !defined(DISABLE_DBUS) | ||
89 | QFile tmp(DataPaths::path(DataPaths::Temp) + QLatin1String("/falkon_notif.png")); | 89 | QFile tmp(DataPaths::path(DataPaths::Temp) + QLatin1String("/falkon_notif.png")); | ||
90 | tmp.open(QFile::WriteOnly); | 90 | tmp.open(QFile::WriteOnly); | ||
91 | icon.save(tmp.fileName()); | 91 | icon.save(tmp.fileName()); | ||
92 | 92 | | |||
93 | const QVariantMap hints { | ||||
94 | {QStringLiteral("desktop-entry"), QGuiApplication::desktopFileName()} | ||||
kossebau: Saw by accident: Beware that this might be with or without ".desktop" suffix in reality (cmp. | |||||
It is set without the suffix here https://cgit.kde.org/falkon.git/tree/src/lib/app/mainapplication.cpp#n119 So I can safely assume I get it without suffix, can I? nicolasfella: It is set without the suffix here https://cgit.kde.org/falkon. | |||||
Oops, my bad, had missed this was for Falkon and not some lib, was confused after having scanned some things and just made a drive-by comment. kossebau: Oops, my bad, had missed this was for Falkon and not some lib, was confused after having… | |||||
95 | }; | ||||
96 | | ||||
93 | QDBusInterface dbus("org.freedesktop.Notifications", "/org/freedesktop/Notifications", "org.freedesktop.Notifications", QDBusConnection::sessionBus()); | 97 | QDBusInterface dbus("org.freedesktop.Notifications", "/org/freedesktop/Notifications", "org.freedesktop.Notifications", QDBusConnection::sessionBus()); | ||
94 | QVariantList args; | 98 | QVariantList args; | ||
95 | args.append(QLatin1String("falkon")); | 99 | args.append(QLatin1String("Falkon")); | ||
96 | args.append(m_uint); | 100 | args.append(m_uint); | ||
97 | args.append(tmp.fileName()); | 101 | args.append(tmp.fileName()); | ||
98 | args.append(heading); | 102 | args.append(heading); | ||
99 | args.append(text); | 103 | args.append(text); | ||
100 | args.append(QStringList()); | 104 | args.append(QStringList()); | ||
101 | args.append(QVariantMap()); | 105 | args.append(hints); | ||
102 | args.append(m_timeout); | 106 | args.append(m_timeout); | ||
103 | dbus.callWithCallback("Notify", args, this, SLOT(updateLastId(QDBusMessage)), SLOT(error(QDBusError))); | 107 | dbus.callWithCallback("Notify", args, this, SLOT(updateLastId(QDBusMessage)), SLOT(error(QDBusError))); | ||
104 | #endif | 108 | #endif | ||
105 | break; | 109 | break; | ||
106 | } | 110 | } | ||
107 | } | 111 | } | ||
108 | 112 | | |||
109 | void DesktopNotificationsFactory::nativeNotificationPreview() | 113 | void DesktopNotificationsFactory::nativeNotificationPreview() | ||
Show All 27 Lines |
Saw by accident: Beware that this might be with or without ".desktop" suffix in reality (cmp. recent discussion with quassel) ;) No idea what value is expected here, you might to chop or append as needed. > https://bugreports.qt.io/browse/QTBUG-75521