summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp
diff options
context:
space:
mode:
authorFabian Bumberger <fbumberger@rim.com>2013-09-19 20:27:00 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-20 13:36:35 +0200
commitac2edceb02a61c1d670312385b1d709417961799 (patch)
tree3195e852c3ba79890ca187fce2373d5fe9f76a99 /src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp
parent559c648e41a5a3b33127fd3a786934bff7ecf828 (diff)
Refactor device and service discovery errors
- Make them more consistent with other Qt modules - Propagate the error during device discovery to the QBluetoothServiceDiscoveryAgent Change-Id: Idcd3e0e6061b85e8b6adad248625740f3b91289a Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp')
-rw-r--r--src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp b/src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp
index d10dcc4b..257ebf3d 100644
--- a/src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp
+++ b/src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp
@@ -97,7 +97,7 @@ void QBluetoothDeviceDiscoveryAgentPrivate::start()
#ifdef QT_DEVICEDISCOVERY_DEBUG
qDebug() << Q_FUNC_INFO << "ERROR: " << errorString;
#endif
- lastError = QBluetoothDeviceDiscoveryAgent::IOFailure;
+ lastError = QBluetoothDeviceDiscoveryAgent::InputOutputError;
Q_Q(QBluetoothDeviceDiscoveryAgent);
emit q->error(lastError);
return;
@@ -115,11 +115,11 @@ void QBluetoothDeviceDiscoveryAgentPrivate::start()
QDBusPendingReply<QVariantMap> propertiesReply = adapter->GetProperties();
propertiesReply.waitForFinished();
if(propertiesReply.isError()) {
+ errorString = propertiesReply.error().message();
#ifdef QT_DEVICEDISCOVERY_DEBUG
qDebug() << Q_FUNC_INFO << "ERROR: " << errorString;
#endif
- errorString = propertiesReply.error().message();
- lastError = QBluetoothDeviceDiscoveryAgent::IOFailure;
+ lastError = QBluetoothDeviceDiscoveryAgent::InputOutputError;
Q_Q(QBluetoothDeviceDiscoveryAgent);
emit q->error(lastError);
return;
@@ -130,7 +130,7 @@ void QBluetoothDeviceDiscoveryAgentPrivate::start()
delete adapter;
adapter = 0;
errorString = discoveryReply.error().message();
- lastError = QBluetoothDeviceDiscoveryAgent::IOFailure;
+ lastError = QBluetoothDeviceDiscoveryAgent::InputOutputError;
Q_Q(QBluetoothDeviceDiscoveryAgent);
emit q->error(lastError);
#ifdef QT_DEVICEDISCOVERY_DEBUG