mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Cleanup: Use QString as parameter for [get|save]BtDeviceInfo()
Each callsite of saveBtDeviceInfo() has a QString, which is converted to a C-string, passed and immediately converted back. Remove these conversions by taking a reference to QString directly. getBtDeviceInfo() is not as clear. Here, the callsite has a C-string handed down from libdivecomputer. Nevertheless, pass a reference of QString here as well. Firstly, for reasons of symmetry. Secondly, to avoid multiple conversions in the getBtDeviceInfo() functions. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
d9c0df0142
commit
7bd860f2b7
4 changed files with 7 additions and 7 deletions
|
|
@ -298,7 +298,7 @@ dc_status_t qt_ble_open(dc_custom_io_t *io, dc_context_t *context, const char *d
|
|||
qputenv("QT_DEFAULT_CENTRAL_SERVICES", "1");
|
||||
|
||||
#if defined(Q_OS_MACOS) || defined(Q_OS_IOS)
|
||||
QBluetoothDeviceInfo remoteDevice = getBtDeviceInfo(devaddr);
|
||||
QBluetoothDeviceInfo remoteDevice = getBtDeviceInfo(QString(devaddr));
|
||||
QLowEnergyController *controller = QLowEnergyController::createCentral(remoteDevice);
|
||||
#else
|
||||
// this is deprecated but given that we don't use Qt to scan for
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue