diff options
Diffstat (limited to 'src/bluetooth/qbluetoothtransferreply_bluez.cpp')
-rw-r--r-- | src/bluetooth/qbluetoothtransferreply_bluez.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/bluetooth/qbluetoothtransferreply_bluez.cpp b/src/bluetooth/qbluetoothtransferreply_bluez.cpp index 3c63adeb..0634f080 100644 --- a/src/bluetooth/qbluetoothtransferreply_bluez.cpp +++ b/src/bluetooth/qbluetoothtransferreply_bluez.cpp @@ -110,13 +110,21 @@ bool QBluetoothTransferReplyBluez::start() } else { if (!file->exists()) { - m_errorStr = tr("File does not exist"); + m_errorStr = QBluetoothTransferReply::tr("File does not exist"); m_error = QBluetoothTransferReply::FileNotFoundError; m_finished = true; m_running = false; QMetaObject::invokeMethod(this, "finished", Qt::QueuedConnection, Q_ARG(QBluetoothTransferReply*, this)); return false; } + if (request().address().isNull()) { + m_errorStr = QBluetoothTransferReply::tr("Invalid target address"); + m_error = QBluetoothTransferReply::HostNotFoundError; + m_finished = true; + m_running = false; + QMetaObject::invokeMethod(this, "finished", Qt::QueuedConnection, Q_ARG(QBluetoothTransferReply*, this)); + return false; + } m_size = file->size(); startOPP(file->fileName()); } |