summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Zanetti <michael.zanetti@nokia.com>2012-02-24 14:53:47 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-27 11:38:04 +0100
commit42fcc4d413424cecb7aa0be2b8cc2503b42fe408 (patch)
tree29acfd11d9e7cb594e9fcd7b0ac1f9df936f71ee
parentefb110bb45e5b7385495091628baaf3ec0babde0 (diff)
downloadqtconnectivity-42fcc4d413424cecb7aa0be2b8cc2503b42fe408.tar.gz
also signal a failed transfer to the Bluetooth Services
Change-Id: I82e59ca93cd3861354ddacd0fc97388109633751 Reviewed-by: Alex <alex.blasche@nokia.com>
-rw-r--r--src/bluetooth/qbluetoothtransferreply_bluez.cpp7
-rw-r--r--src/bluetooth/qbluetoothtransferreply_bluez_p.h4
2 files changed, 7 insertions, 4 deletions
diff --git a/src/bluetooth/qbluetoothtransferreply_bluez.cpp b/src/bluetooth/qbluetoothtransferreply_bluez.cpp
index 9cdd43d0..f5db9500 100644
--- a/src/bluetooth/qbluetoothtransferreply_bluez.cpp
+++ b/src/bluetooth/qbluetoothtransferreply_bluez.cpp
@@ -172,6 +172,13 @@ void QBluetoothTransferReplyBluez::sendReturned(QDBusPendingCallWatcher *watcher
else
m_error = QBluetoothTransferReply::UnknownError;
+#ifdef NOKIA_BT_SERVICES
+ // Inform the service daemon that an outgoing transfer has failed (use a fake transfer ID as there is no real one yet)
+ QFile *file = qobject_cast<QFile *>(source);
+ nokiaBtServiceInstance()->outgoingFile("/transfer9999", address.toString(), file->fileName(), QBluetoothTransferReply::attribute(QBluetoothTransferRequest::TypeAttribute).toString(), m_size);
+ nokiaBtServiceInstance()->setTransferFinished("/transfer9999", false);
+#endif
+
// allow time for the developer to connect to the signal
QMetaObject::invokeMethod(this, "finished", Qt::QueuedConnection, Q_ARG(QBluetoothTransferReply*, this));
}
diff --git a/src/bluetooth/qbluetoothtransferreply_bluez_p.h b/src/bluetooth/qbluetoothtransferreply_bluez_p.h
index 77c32e4b..65987a00 100644
--- a/src/bluetooth/qbluetoothtransferreply_bluez_p.h
+++ b/src/bluetooth/qbluetoothtransferreply_bluez_p.h
@@ -109,10 +109,6 @@ private:
QString m_transfer_path;
-#ifdef NOKIA_BT_SERVICES
- static QObject *s_obexService;
-#endif
-
static bool copyToTempFile(QIODevice *to, QIODevice *from);
private slots: