diff options
author | Michael Zanetti <michael.zanetti@nokia.com> | 2012-02-24 14:53:47 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-27 11:38:04 +0100 |
commit | 42fcc4d413424cecb7aa0be2b8cc2503b42fe408 (patch) | |
tree | 29acfd11d9e7cb594e9fcd7b0ac1f9df936f71ee | |
parent | efb110bb45e5b7385495091628baaf3ec0babde0 (diff) | |
download | qtconnectivity-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.cpp | 7 | ||||
-rw-r--r-- | src/bluetooth/qbluetoothtransferreply_bluez_p.h | 4 |
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: |