summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2022-05-11 16:21:41 +0200
committerIvan Solovev <ivan.solovev@qt.io>2022-05-19 09:53:54 +0200
commitd58d134d25695dd044fc13d57a4d754b1dfb4e4a (patch)
treeffb913f1143e00f948459d6b1af64700b724af3c /tests
parent5f249c3d0105b5b5d104770925b7b2fcefd183f6 (diff)
Introduce error codes for missing permissions
Some operating systems might request special permissions while working with Bluetooth. Previously if the permissions were missing, we were returning an UnknownError, and the error description, when available, was not very good as well. [ChangeLog][QtBluetooth] Various error enums are extended with new error codes that represent missing permissions error. Error descriptions are also updated, when available. This patch also applies new error codes to Android implementation. Fixes: QTBUG-102373 Change-Id: I247371de6b1eb8d39f0f99c50269d2b1f3bf21c2 Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi>
Diffstat (limited to 'tests')
-rw-r--r--tests/bttestui/btlocaldevice.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/bttestui/btlocaldevice.cpp b/tests/bttestui/btlocaldevice.cpp
index 53634a78..30dde951 100644
--- a/tests/bttestui/btlocaldevice.cpp
+++ b/tests/bttestui/btlocaldevice.cpp
@@ -489,6 +489,7 @@ void BtLocalDevice::dumpSocketInformation()
case QBluetoothSocket::SocketError::NetworkError: tmp += "NetworkError"; break;
//case QBluetoothSocket::SocketError::OperationError: tmp+= "OperationError"; break;
case QBluetoothSocket::SocketError::UnsupportedProtocolError: tmp += "UnsupportedProtocolError"; break;
+ case QBluetoothSocket::SocketError::MissingPermissionsError: tmp += "MissingPermissionsError"; break;
default: tmp+= "Undefined"; break;
}
@@ -730,6 +731,7 @@ void BtLocalDevice::dumpServerInformation()
case QBluetoothSocket::SocketError::NetworkError: tmp += "NetworkError"; break;
case QBluetoothSocket::SocketError::UnsupportedProtocolError: tmp += "UnsupportedProtocolError"; break;
//case QBluetoothSocket::SocketError::OperationError: tmp+= "OperationError"; break;
+ case QBluetoothSocket::SocketError::MissingPermissionsError: tmp += "MissingPermissionsError"; break;
default: tmp += QString::number(static_cast<int>(client->error())); break;
}