From c9ebeca4d23d6538aa4835eb2ad555e22e73ef23 Mon Sep 17 00:00:00 2001 From: Patrick von Reth Date: Tue, 3 Feb 2015 12:39:56 +0100 Subject: [PATCH] fixes --- src/core/plugins/pluginsettingswidget.cpp | 3 ++- .../freedesktop/freedesktopnotificationfrontend.cpp | 4 ++-- .../freedesktop/freedesktopnotificationfrontend.h | 9 +++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/core/plugins/pluginsettingswidget.cpp b/src/core/plugins/pluginsettingswidget.cpp index 78ca812..07461c9 100644 --- a/src/core/plugins/pluginsettingswidget.cpp +++ b/src/core/plugins/pluginsettingswidget.cpp @@ -20,6 +20,7 @@ #include "snore.h" #include +#include using namespace Snore; @@ -31,7 +32,7 @@ PluginSettingsWidget::PluginSettingsWidget(SnorePlugin *snorePlugin, QWidget *pa m_enabled(new QCheckBox) { setLayout(m_layout); - addRow(snorePlugin->typeName(),nullptr); + addRow("Type:", new QLabel(snorePlugin->typeName())); addRow("Enabled:",m_enabled); } diff --git a/src/plugins/frontends/freedesktop/freedesktopnotificationfrontend.cpp b/src/plugins/frontends/freedesktop/freedesktopnotificationfrontend.cpp index ced39ad..166e3e2 100644 --- a/src/plugins/frontends/freedesktop/freedesktopnotificationfrontend.cpp +++ b/src/plugins/frontends/freedesktop/freedesktopnotificationfrontend.cpp @@ -43,13 +43,13 @@ FreedesktopFrontend::~FreedesktopFrontend() dbus.unregisterService("org.freedesktop.Notifications"); } -bool FreedesktopFrontend::initialize(SnoreCore *snore) +bool FreedesktopFrontend::initialize() { m_adaptor = new NotificationsAdaptor(this); QDBusConnection dbus = QDBusConnection::sessionBus(); if (dbus.registerService("org.freedesktop.Notifications") && dbus.registerObject("/org/freedesktop/Notifications", this)) { - return SnoreFrontend::initialize(snore); + return SnoreFrontend::initialize(); } return false; } diff --git a/src/plugins/frontends/freedesktop/freedesktopnotificationfrontend.h b/src/plugins/frontends/freedesktop/freedesktopnotificationfrontend.h index 22754d2..76e74f6 100644 --- a/src/plugins/frontends/freedesktop/freedesktopnotificationfrontend.h +++ b/src/plugins/frontends/freedesktop/freedesktopnotificationfrontend.h @@ -32,11 +32,12 @@ class FreedesktopFrontend : public Snore::SnoreFrontend public: FreedesktopFrontend(); ~FreedesktopFrontend(); - virtual bool initialize(Snore::SnoreCore *snore); - virtual bool deinitialize(); + virtual bool initialize() override; + virtual bool deinitialize() override; + + void actionInvoked(Snore::Notification notification) override; + void notificationClosed(Snore::Notification notification) override; - void actionInvoked(Snore::Notification notification); - void notificationClosed(Snore::Notification notification); uint Notify(const QString &app_name, uint replaces_id, const QString &app_icon, const QString &summary, const QString &body, const QStringList &actions, const QVariantMap &hints, int timeout); void CloseNotification(uint id);