diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-02-25 00:17:33 +0100 |
---|---|---|
committer | Jan Mulder <jlmulder@xs4all.nl> | 2018-02-26 08:52:34 +0100 |
commit | 7bd860f2b768ac9f14fea7a55ad23092a9f4bba2 (patch) | |
tree | 0df83dd12c2d9a8ea03de6f9e53932d56d642ae5 /core/btdiscovery.h | |
parent | d9c0df01424268ca7ba568279f08683f2c98aa44 (diff) | |
download | subsurface-7bd860f2b768ac9f14fea7a55ad23092a9f4bba2.tar.gz |
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>
Diffstat (limited to 'core/btdiscovery.h')
-rw-r--r-- | core/btdiscovery.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/btdiscovery.h b/core/btdiscovery.h index 7a9e9c655..212585688 100644 --- a/core/btdiscovery.h +++ b/core/btdiscovery.h @@ -16,8 +16,8 @@ #include <QAndroidJniEnvironment> #endif -void saveBtDeviceInfo(const char* devaddr, QBluetoothDeviceInfo deviceInfo); -QBluetoothDeviceInfo getBtDeviceInfo(const char* devaddr); +void saveBtDeviceInfo(const QString &devaddr, QBluetoothDeviceInfo deviceInfo); +QBluetoothDeviceInfo getBtDeviceInfo(const QString &devaddr); class BTDiscovery : public QObject { Q_OBJECT |