From e0e74c1011bf6b6d6d70a4b5871be0e07371576b Mon Sep 17 00:00:00 2001 From: Patrick von Reth Date: Wed, 20 Nov 2013 17:36:22 +0100 Subject: [PATCH] as SnoreToast has been renamed rename it in the default loading --- src/core/snore.cpp | 13 +++++----- src/core/snore.h | 2 +- src/plugins/backends/snoretoast/toaster.h | 29 ----------------------- 3 files changed, 8 insertions(+), 36 deletions(-) delete mode 100644 src/plugins/backends/snoretoast/toaster.h diff --git a/src/core/snore.cpp b/src/core/snore.cpp index ea52cf4..9f64944 100644 --- a/src/core/snore.cpp +++ b/src/core/snore.cpp @@ -213,9 +213,9 @@ bool SnoreCore::setPrimaryNotificationBackend() { QStringList backends = notificationBackends(); #ifdef Q_OS_WIN - if(QSysInfo::windowsVersion() == QSysInfo::WV_WINDOWS8 && backends.contains("SnoreToast")) + if(QSysInfo::windowsVersion() == QSysInfo::WV_WINDOWS8 && backends.contains("Windows 8")) { - if(setPrimaryNotificationBackend("SnoreToast")) + if(setPrimaryNotificationBackend("Windows 8")) return true; } if( backends.contains("Growl")) @@ -246,10 +246,11 @@ bool SnoreCore::setPrimaryNotificationBackend() return false; } -const QString &SnoreCore::primaryNotificationBackend(){ - if(m_notificationBackend == NULL){ - static QString none; - return none; +const QString SnoreCore::primaryNotificationBackend() +{ + if(m_notificationBackend == NULL) + { + return QString(); } return m_notificationBackend->name(); } diff --git a/src/core/snore.h b/src/core/snore.h index 79e9432..de33f53 100644 --- a/src/core/snore.h +++ b/src/core/snore.h @@ -61,7 +61,7 @@ public: bool setPrimaryNotificationBackend( const QString &backend ); bool setPrimaryNotificationBackend(); - const QString &primaryNotificationBackend(); + const QString primaryNotificationBackend(); QSystemTrayIcon *trayIcon(); Notification getActiveNotificationByID(uint id); diff --git a/src/plugins/backends/snoretoast/toaster.h b/src/plugins/backends/snoretoast/toaster.h deleted file mode 100644 index 76e39db..0000000 --- a/src/plugins/backends/snoretoast/toaster.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef TOASTER_H -#define TOASTER_H - -#include "core/plugins/snorebackend.h" - -class SnoreToast : public Snore::SnoreBackend -{ - Q_OBJECT - Q_INTERFACES(Snore::SnoreBackend) -public: - SnoreToast(); - ~SnoreToast(); - bool init(Snore::SnoreCore *snore); - - - // SnoreBackend interface -public slots: - void registerApplication(Snore::Application *application); - void unregisterApplication(Snore::Application *application); - uint notify(Snore::Notification notification); - void closeNotification(Snore::Notification notification); - -private slots: - void slotToastNotificationClosed(int code, QProcess::ExitStatus); - - -}; - -#endif // TOASTER_H