diff options
| author | Tomasz Sterna <tomek@xiaoka.com> | 2014-08-01 12:57:32 +0200 |
|---|---|---|
| committer | Tomasz Sterna <tomek@xiaoka.com> | 2014-08-02 00:55:17 +0200 |
| commit | 006d08310e5fafa8b66520318598122603e32d8c (patch) | |
| tree | 7aeabca8467991449d69fbaa49994b2be6bae820 /daemon/notificationmanager.cpp | |
| parent | 38370fcf6213e4c8961dae6e55bccb951795865f (diff) | |
Provide Settings object via constructor
Diffstat (limited to 'daemon/notificationmanager.cpp')
| -rw-r--r-- | daemon/notificationmanager.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/daemon/notificationmanager.cpp b/daemon/notificationmanager.cpp index ad2c98f..9050605 100644 --- a/daemon/notificationmanager.cpp +++ b/daemon/notificationmanager.cpp @@ -25,15 +25,15 @@ public: bool connected; }; -NotificationManager::NotificationManager(QObject *parent) - : QObject(parent), d_ptr(new NotificationManagerPrivate(this)) +NotificationManager::NotificationManager(Settings *settings, QObject *parent) + : QObject(parent), d_ptr(new NotificationManagerPrivate(this)), settings(settings) { Q_D(NotificationManager); QDBusConnection::sessionBus().registerObject("/org/freedesktop/Notifications", this, QDBusConnection::ExportAllSlots); d->interface = new QDBusInterface("org.freedesktop.DBus", "/org/freedesktop/DBus", - "org.freedesktop.DBus"); + "org.freedesktop.DBus"); d->interface->call("AddMatch", "interface='org.freedesktop.Notifications',member='Notify',type='method_call',eavesdrop='true'"); @@ -104,11 +104,6 @@ QStringHash NotificationManager::getCategoryParams(QString category) return QStringHash(); } -void NotificationManager::setSettings(Settings *settings) -{ - this->settings = settings; -} - void NotificationManager::Notify(const QString &app_name, uint replaces_id, const QString &app_icon, const QString &summary, const QString &body, const QStringList &actions, const QVariantHash &hints, int expire_timeout) { |
