Commit a39f1357 authored by Konstantin Ritt's avatar Konstantin Ritt
Browse files

QLowEnergyController: Introduce AuthorizationError


intended to distinguish an arbitrary disconnection
from disconnection due to insufficient authorization/encryption

Change-Id: Ifcf73d0444fe6fd3a8d5d90155f3db572d6e23d1
Reviewed-by: default avatarEvgeniy Gagarin <eeiaao@gmail.com>
Reviewed-by: default avatarAlex Blasche <alexander.blasche@qt.io>
Showing with 8 additions and 1 deletion
......@@ -159,6 +159,9 @@ Q_DECLARE_LOGGING_CATEGORY(QT_BT_WINRT)
This value was introduced by Qt 5.7.
\value RemoteHostClosedError The remote device closed the connection.
This value was introduced by Qt 5.10.
\value AuthorizationError The local Bluetooth device closed the connection due to
insufficient authorization.
This value was introduced by Qt 5.14.
*/
/*!
......
......@@ -66,7 +66,8 @@ public:
InvalidBluetoothAdapterError,
ConnectionError,
AdvertisingError,
RemoteHostClosedError
RemoteHostClosedError,
AuthorizationError
};
Q_ENUM(Error)
......
......@@ -106,6 +106,9 @@ void QLowEnergyControllerPrivate::setError(
case QLowEnergyController::RemoteHostClosedError:
errorString = QLowEnergyController::tr("Remote device closed the connection");
break;
case QLowEnergyController::AuthorizationError:
errorString = QLowEnergyController::tr("Failed to authorize on the remote device");
break;
case QLowEnergyController::NoError:
return;
default:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment