mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 17:37:36 +03:00
Fix systray class when built without FDO support
This commit is contained in:
parent
804eaa700e
commit
dbc085d4d4
1 changed files with 3 additions and 7 deletions
|
@ -26,21 +26,17 @@
|
|||
|
||||
void Systray::showMessage(const QString & title, const QString & message, MessageIcon icon, int millisecondsTimeoutHint)
|
||||
{
|
||||
bool useFdoNotifications = false;
|
||||
|
||||
#ifdef USE_FDO_NOTIFICATIONS
|
||||
if(QDBusInterface(NOTIFICATIONS_SERVICE, NOTIFICATIONS_PATH, NOTIFICATIONS_IFACE).isValid()) {
|
||||
useFdoNotifications = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (useFdoNotifications) {
|
||||
QList<QVariant> args = QList<QVariant>() << "owncloud" << quint32(0) << "owncloud"
|
||||
<< title << message << QStringList () << QVariantMap() << qint32(-1);
|
||||
QDBusMessage method = QDBusMessage::createMethodCall(NOTIFICATIONS_SERVICE, NOTIFICATIONS_PATH, NOTIFICATIONS_IFACE, "Notify");
|
||||
method.setArguments(args);
|
||||
QDBusConnection::sessionBus().asyncCall(method);
|
||||
} else {
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
QSystemTrayIcon::showMessage(title, message, icon, millisecondsTimeoutHint);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue