Changeset View
Changeset View
Standalone View
Standalone View
dataengines/notifications/notificationsengine.cpp
Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Line(s) | |||||
90 | 90 | | |||
91 | void NotificationsEngine::init() | 91 | void NotificationsEngine::init() | ||
92 | { | 92 | { | ||
93 | } | 93 | } | ||
94 | 94 | | |||
95 | bool NotificationsEngine::registerDBusService() | 95 | bool NotificationsEngine::registerDBusService() | ||
96 | { | 96 | { | ||
97 | QDBusConnection dbus = QDBusConnection::sessionBus(); | 97 | QDBusConnection dbus = QDBusConnection::sessionBus(); | ||
98 | dbus.registerObject(QStringLiteral("/org/freedesktop/Notifications"), this); | ||||
98 | bool so = dbus.registerService(QStringLiteral("org.freedesktop.Notifications")); | 99 | bool so = dbus.registerService(QStringLiteral("org.freedesktop.Notifications")); | ||
99 | if (so) { | 100 | if (so) { | ||
100 | bool ro = dbus.registerObject(QStringLiteral("/org/freedesktop/Notifications"), this); | | |||
101 | if (ro) { | | |||
102 | qDebug() << "Notifications service registered"; | | |||
103 | return true; | 101 | return true; | ||
104 | } else { | | |||
105 | dbus.unregisterService(QStringLiteral("org.freedesktop.Notifications")); | | |||
106 | } | | |||
107 | } | 102 | } | ||
108 | 103 | | |||
109 | qDebug() << "Failed to register Notifications service"; | 104 | qDebug() << "Failed to register Notifications service"; | ||
110 | return false; | 105 | return false; | ||
111 | } | 106 | } | ||
112 | 107 | | |||
113 | inline void copyLineRGB32(QRgb* dst, const char* src, int width) | 108 | inline void copyLineRGB32(QRgb* dst, const char* src, int width) | ||
114 | { | 109 | { | ||
▲ Show 20 Lines • Show All 383 Lines • Show Last 20 Lines |