summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothtransferreply_qnx.cpp
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2014-09-16 14:04:02 +0200
committerAlex Blasche <alexander.blasche@digia.com>2014-09-18 10:09:50 +0200
commitea917cfce56186ac7cddddd701cfb83f8127a751 (patch)
tree41ef97aba23df27474ca19322b28f9230588ce47 /src/bluetooth/qbluetoothtransferreply_qnx.cpp
parente04e8f8aec8afe130427d88a3ae891f0d1bc751f (diff)
Add missing error() signal to QBluetoothTransferReply
The signal makes error handling much more conveniant. One error situation on QNX did not emit the required finished()/errorType() signals when required. A few minor typo fixes. Task-number: QTBUG-38983 Change-Id: I89c3fbee43921c8894a0ab200ee5550e7dc44543 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/bluetooth/qbluetoothtransferreply_qnx.cpp')
-rw-r--r--src/bluetooth/qbluetoothtransferreply_qnx.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bluetooth/qbluetoothtransferreply_qnx.cpp b/src/bluetooth/qbluetoothtransferreply_qnx.cpp
index 072230b1..acd60894 100644
--- a/src/bluetooth/qbluetoothtransferreply_qnx.cpp
+++ b/src/bluetooth/qbluetoothtransferreply_qnx.cpp
@@ -106,6 +106,7 @@ bool QBluetoothTransferReplyQnx::start()
m_error = QBluetoothTransferReply::ResourceBusyError;
m_finished = true;
m_running = false;
+ emit QBluetoothTransferReply::error(m_error);
emit finished(this);
return false;
}
@@ -115,6 +116,7 @@ bool QBluetoothTransferReplyQnx::start()
m_error = QBluetoothTransferReply::IODeviceNotReadableError;
m_finished = true;
m_running = false;
+ emit QBluetoothTransferReply::error(m_error);
emit finished(this);
return false;
}
@@ -134,6 +136,7 @@ bool QBluetoothTransferReplyQnx::start()
m_error = QBluetoothTransferReply::FileNotFoundError;
m_finished = true;
m_running = false;
+ emit QBluetoothTransferReply::error(m_error);
QMetaObject::invokeMethod(this, "finished", Qt::QueuedConnection, Q_ARG(QBluetoothTransferReply*, this));
return false;
}
@@ -142,6 +145,7 @@ bool QBluetoothTransferReplyQnx::start()
m_error = QBluetoothTransferReply::HostNotFoundError;
m_finished = true;
m_running = false;
+ emit QBluetoothTransferReply::error(m_error);
QMetaObject::invokeMethod(this, "finished", Qt::QueuedConnection, Q_ARG(QBluetoothTransferReply*, this));
return false;
}
@@ -192,6 +196,8 @@ void QBluetoothTransferReplyQnx::controlReply(ppsResult result)
if (!result.errorMsg.isEmpty()) {
m_errorStr = result.errorMsg;
m_error = QBluetoothTransferReply::UnknownError;
+ emit QBluetoothTransferReply::error(m_error);
+ emit finished(this);
}
}
@@ -214,6 +220,7 @@ void QBluetoothTransferReplyQnx::controlEvent(ppsResult result)
// } else {
m_errorStr = result.errorMsg;
m_error = QBluetoothTransferReply::UnknownError;
+ emit QBluetoothTransferReply::error(m_error);
// }
emit finished(this);
} else if (result.msg == QStringLiteral("opp_update")) {