summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothtransferreply_qnx.cpp
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2013-10-10 12:09:55 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-11 13:11:52 +0200
commit8155679b01ec523d877bcb1d6d019b3b555befaa (patch)
treecdacff719274d632bc02011a6deb9cd142226f74 /src/bluetooth/qbluetoothtransferreply_qnx.cpp
parent42bd6c83b19f789821c4fde414f1ef457dce120d (diff)
Improve handling of invalid Bt address by QBluetoothTransferManager
Some minor unit test improvements Task-number: QTBUG-33801 Change-Id: Idc98bf8928ced0f9e01b24668edf7c32172d2fd1 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src/bluetooth/qbluetoothtransferreply_qnx.cpp')
-rw-r--r--src/bluetooth/qbluetoothtransferreply_qnx.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/bluetooth/qbluetoothtransferreply_qnx.cpp b/src/bluetooth/qbluetoothtransferreply_qnx.cpp
index e37852cd..b3425300 100644
--- a/src/bluetooth/qbluetoothtransferreply_qnx.cpp
+++ b/src/bluetooth/qbluetoothtransferreply_qnx.cpp
@@ -1,6 +1,7 @@
/***************************************************************************
**
** Copyright (C) 2013 Research In Motion
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtBluetooth module of the Qt Toolkit.
@@ -113,13 +114,21 @@ bool QBluetoothTransferReplyQnx::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;
+ }
startOPP(file->fileName());
}
return true;