summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2017-04-07 19:39:42 +0300
committerAlex Blasche <alexander.blasche@qt.io>2017-07-10 05:51:07 +0000
commitccd1e69e83144781aabb3d1b3f7d33abb797521c (patch)
treed9dc578fdded7998e7cc6d0509ece14a6be01a79 /src
parent4feae652c9c12ec4e5ef4c7bd575f8f316494add (diff)
QLowEnergyController: introduce ConnectionClosedError
Unlike ConnectionError, this shall be used to mention errors occurred due to the remote device's intent (term, power loss, etc) Change-Id: I6918879e3918a5131841f012b2824c30b99e472d Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/bluetooth/qlowenergycontroller.cpp5
-rw-r--r--src/bluetooth/qlowenergycontroller.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/bluetooth/qlowenergycontroller.cpp b/src/bluetooth/qlowenergycontroller.cpp
index 053ca980..004ee3be 100644
--- a/src/bluetooth/qlowenergycontroller.cpp
+++ b/src/bluetooth/qlowenergycontroller.cpp
@@ -138,6 +138,8 @@ Q_DECLARE_LOGGING_CATEGORY(QT_BT)
This value was introduced by Qt 5.5.
\value AdvertisingError The attempt to start advertising failed.
This value was introduced by Qt 5.7.
+ \value RemoteHostClosedError The remote device closed the connection.
+ This value was introduced by Qt 5.10.
*/
/*!
@@ -299,6 +301,9 @@ void QLowEnergyControllerPrivate::setError(
case QLowEnergyController::AdvertisingError:
errorString = QLowEnergyController::tr("Error occurred trying to start advertising");
break;
+ case QLowEnergyController::RemoteHostClosedError:
+ errorString = QLowEnergyController::tr("Remote device closed the connection");
+ break;
case QLowEnergyController::NoError:
return;
default:
diff --git a/src/bluetooth/qlowenergycontroller.h b/src/bluetooth/qlowenergycontroller.h
index 1c4fa83f..1a84b05b 100644
--- a/src/bluetooth/qlowenergycontroller.h
+++ b/src/bluetooth/qlowenergycontroller.h
@@ -66,6 +66,7 @@ public:
InvalidBluetoothAdapterError,
ConnectionError,
AdvertisingError,
+ RemoteHostClosedError
};
Q_ENUM(Error)