diff options
| author | Tomasz Sterna <tomek@xiaoka.com> | 2014-07-12 01:13:04 +0200 |
|---|---|---|
| committer | Tomasz Sterna <tomek@xiaoka.com> | 2014-07-12 01:13:04 +0200 |
| commit | 4d55e3d01c1c75a979ad6f53ac18648fc90c6934 (patch) | |
| tree | f4b169bc70a13c644ec7da4d5c995ad367999c10 /daemon | |
| parent | c84773de3af76832d15806647d8529c2e5b75257 (diff) | |
Reworked PebbledInterface DBus handling
Diffstat (limited to 'daemon')
| -rw-r--r-- | daemon/manager.cpp | 1 | ||||
| -rw-r--r-- | daemon/watchconnector.cpp | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/daemon/manager.cpp b/daemon/manager.cpp index c045c1b..8ff6785 100644 --- a/daemon/manager.cpp +++ b/daemon/manager.cpp @@ -24,7 +24,6 @@ Manager::Manager(watch::WatchConnector *watch, DBusConnector *dbus, VoiceCallMan connect(voice, SIGNAL(activeVoiceCallChanged()), SLOT(onActiveVoiceCallChanged())); connect(voice, SIGNAL(error(const QString &)), SLOT(onVoiceError(const QString &))); - // Watch instantiated hangup, follow the orders connect(watch, SIGNAL(hangup()), SLOT(hangupAll())); connect(watch, SIGNAL(connectedChanged()), SLOT(onConnectedChanged())); diff --git a/daemon/watchconnector.cpp b/daemon/watchconnector.cpp index d0fcdad..088384d 100644 --- a/daemon/watchconnector.cpp +++ b/daemon/watchconnector.cpp @@ -176,11 +176,11 @@ void WatchConnector::onDisconnected() bool was_connected = is_connected; is_connected = false; + if (was_connected) emit connectedChanged(); + QBluetoothSocket *socket = qobject_cast<QBluetoothSocket *>(sender()); if (!socket) return; - if (was_connected) emit connectedChanged(); - socket->deleteLater(); reconnectTimer.setInterval(reconnectTimer.interval() + __reconnect_timeout); |
