summaryrefslogtreecommitdiff
path: root/saltoqd/notificationmanager.cpp
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2015-04-26 00:16:22 +0200
committerJavier <dev.git@javispedro.com>2015-04-26 00:16:22 +0200
commit3667abb3cadc1915d0c0a17750bbbe7fa9b6a2d2 (patch)
tree6b2332c5d62e7121f156deb4453065fdafc2ae76 /saltoqd/notificationmanager.cpp
parent725631cf66a5e4999a90fb82f54377cb92859e1c (diff)
downloadsaltoq-3667abb3cadc1915d0c0a17750bbbe7fa9b6a2d2.tar.gz
saltoq-3667abb3cadc1915d0c0a17750bbbe7fa9b6a2d2.zip
adapt to new notificationmonitor API
Diffstat (limited to 'saltoqd/notificationmanager.cpp')
-rw-r--r--saltoqd/notificationmanager.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/saltoqd/notificationmanager.cpp b/saltoqd/notificationmanager.cpp
index 8e0e5d2..9c3a63c 100644
--- a/saltoqd/notificationmanager.cpp
+++ b/saltoqd/notificationmanager.cpp
@@ -5,14 +5,20 @@
using namespace watchfish;
+static NotificationMonitor *monitor = 0;
+
NotificationManager::NotificationManager(CardManager *card, ToqManager *toq) :
- QObject(toq), _toq(toq), _monitor(NotificationMonitor::instance()),
+ QObject(toq), _toq(toq),
_card(card),
_deck(new CardDeck("com.qualcomm.qce.androidnotifications", "Notifications", this))
{
_card->installDeck(_deck);
- connect(_monitor, &NotificationMonitor::notification,
+ if (monitor == 0) {
+ monitor = new NotificationMonitor;
+ }
+
+ connect(monitor, &NotificationMonitor::notification,
this, &NotificationManager::handleNotification);
}