From 95dd564456d1dd85977f33b57baff1a1fe3074da Mon Sep 17 00:00:00 2001 From: Patrick von Reth Date: Tue, 7 Feb 2012 18:20:04 +0100 Subject: [PATCH] fixed some warnings --- src/core/notification/notification.cpp | 29 ++++++++++--------- src/core/plugins/plugincontainer.cpp | 5 ++-- src/core/plugins/plugincontainer.h | 2 +- .../freedesktopnotification_backend.cpp | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/core/notification/notification.cpp b/src/core/notification/notification.cpp index a6837f6..7a07822 100644 --- a/src/core/notification/notification.cpp +++ b/src/core/notification/notification.cpp @@ -32,29 +32,30 @@ static int count = 0; class Notification::NotificationData : public QObject { - Q_OBJECT + Q_OBJECT public: NotificationData ( uint id=0 ): m_id ( id ), - m_timeout ( 10 ), - m_source ( NULL ), - m_closeReason(NotificationEnums::CloseReasons::NONE), - m_priority(NotificationEnums::Prioritys::NORMAL) + m_timeout ( 10 ), + m_source ( NULL ), + m_priority(NotificationEnums::Prioritys::NORMAL), + m_closeReason(NotificationEnums::CloseReasons::NONE) + { qDebug()<<"ActiveNotifications"<<++count; } NotificationData ( const QString &application,const QString &alert,const QString &title,const QString &text,const SnoreIcon &icon,int timeout,uint id,NotificationEnums::Prioritys::prioritys priority ): m_id ( id ), - m_timeout ( timeout ), - m_source ( NULL), - m_application ( application ), - m_alert ( alert ), - m_title ( title ), - m_text ( text ), - m_icon ( icon ), - m_priority(priority), - m_closeReason(NotificationEnums::CloseReasons::NONE) + m_timeout ( timeout ), + m_source ( NULL), + m_application ( application ), + m_alert ( alert ), + m_title ( title ), + m_text ( text ), + m_icon ( icon ), + m_priority(priority), + m_closeReason(NotificationEnums::CloseReasons::NONE) { qDebug()<<"ActiveNotifications"<<++count; } diff --git a/src/core/plugins/plugincontainer.cpp b/src/core/plugins/plugincontainer.cpp index 7e878e0..fa6ccc4 100644 --- a/src/core/plugins/plugincontainer.cpp +++ b/src/core/plugins/plugincontainer.cpp @@ -31,8 +31,7 @@ namespace Snore{ PluginContainer::PluginContainer(QString fileName, QString pluginName, PluginContainer::PluginType type) :m_pluginFile(fileName), m_pluginName(pluginName), - m_pluginType(type), - m_instance(NULL) + m_pluginType(type) { } @@ -62,7 +61,7 @@ const QString & PluginContainer::name() return m_pluginName; } -const PluginContainer::PluginType PluginContainer::type() +PluginContainer::PluginType PluginContainer::type() { return m_pluginType; } diff --git a/src/core/plugins/plugincontainer.h b/src/core/plugins/plugincontainer.h index a0cf972..c0933bf 100644 --- a/src/core/plugins/plugincontainer.h +++ b/src/core/plugins/plugincontainer.h @@ -42,7 +42,7 @@ public: SnorePlugin *load(); const QString &file(); const QString &name(); - const PluginContainer::PluginType type(); + PluginContainer::PluginType type(); static PluginContainer::PluginType typeFromString(const QString &t); diff --git a/src/plugins/backends/freedesktop/freedesktopnotification_backend.cpp b/src/plugins/backends/freedesktop/freedesktopnotification_backend.cpp index 9ee83b4..a8e17db 100644 --- a/src/plugins/backends/freedesktop/freedesktopnotification_backend.cpp +++ b/src/plugins/backends/freedesktop/freedesktopnotification_backend.cpp @@ -71,7 +71,7 @@ uint FreedesktopBackend::notify ( Notification noti ) message.setArguments(args); QDBusMessage replyMsg = QDBusConnection::sessionBus().call(message); - uint id ; + uint id = 0; if(replyMsg.type() == QDBusMessage::ReplyMessage){ id= replyMsg.arguments().at(0).toUInt(); qDebug()<<"DBUS_ID"<