summaryrefslogtreecommitdiff
path: root/daemon
diff options
context:
space:
mode:
Diffstat (limited to 'daemon')
-rw-r--r--daemon/daemon.cpp1
-rw-r--r--daemon/manager.cpp19
2 files changed, 11 insertions, 9 deletions
diff --git a/daemon/daemon.cpp b/daemon/daemon.cpp
index 584710a..9d89980 100644
--- a/daemon/daemon.cpp
+++ b/daemon/daemon.cpp
@@ -87,6 +87,7 @@ int main(int argc, char *argv[])
signal(SIGINT, signalhandler);
signal(SIGTERM, signalhandler);
QObject::connect(&app, SIGNAL(aboutToQuit()), &watch, SLOT(endPhoneCall()));
+ QObject::connect(&app, SIGNAL(aboutToQuit()), &watch, SLOT(disconnect()));
return app.exec();
}
diff --git a/daemon/manager.cpp b/daemon/manager.cpp
index fd31e3d..b01006c 100644
--- a/daemon/manager.cpp
+++ b/daemon/manager.cpp
@@ -35,15 +35,6 @@ Manager::Manager(watch::WatchConnector *watch, DBusConnector *dbus, VoiceCallMan
connect(watch, SIGNAL(messageDecoded(uint,QByteArray)), commands, SLOT(processMessage(uint,QByteArray)));
connect(commands, SIGNAL(hangup()), SLOT(hangupAll()));
- // Set BT icon for notification
- notification.setImage("icon-system-bluetooth-device");
-
- if (btDevice.isValid()) {
- logger()->debug() << "BT local name:" << btDevice.name();
- connect(dbus, SIGNAL(pebbleChanged()), SLOT(onPebbleChanged()));
- dbus->findPebble();
- }
-
PebbledProxy *proxy = new PebbledProxy(this);
PebbledAdaptor *adaptor = new PebbledAdaptor(proxy);
QDBusConnection session = QDBusConnection::sessionBus();
@@ -62,6 +53,16 @@ Manager::Manager(watch::WatchConnector *watch, DBusConnector *dbus, VoiceCallMan
this, SLOT(onMprisPropertiesChanged(QString,QMap<QString,QVariant>,QStringList)));
connect(this, SIGNAL(mprisMetadataChanged(QVariantMap)), commands, SLOT(onMprisMetadataChanged(QVariantMap)));
+
+ // Set BT icon for notification
+ notification.setImage("icon-system-bluetooth-device");
+
+ if (btDevice.isValid()) {
+ logger()->debug() << "BT local name:" << btDevice.name();
+ connect(dbus, SIGNAL(pebbleChanged()), SLOT(onPebbleChanged()));
+ dbus->findPebble();
+ }
+
}
void Manager::onSettingChanged(const QString &key)