summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothlocaldevice_android.cpp
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@qt.io>2018-09-25 11:10:13 +0200
committerAlex Blasche <alexander.blasche@qt.io>2018-09-26 06:21:33 +0000
commit343eea046cda781a224b94d1620f9325574837f7 (patch)
treec6aa5c3a0477e539c3cb2f2c918989c3b5a2ff0c /src/bluetooth/qbluetoothlocaldevice_android.cpp
parenta48a19d9db855973f7f0d89ca0759fd7f6856f55 (diff)
Minor code cleanup for QBluetoothLocalDevice implementation on Android
Change-Id: I22da03879c23f6b6842cb832cea0cfee6e016445 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/bluetooth/qbluetoothlocaldevice_android.cpp')
-rw-r--r--src/bluetooth/qbluetoothlocaldevice_android.cpp24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/bluetooth/qbluetoothlocaldevice_android.cpp b/src/bluetooth/qbluetoothlocaldevice_android.cpp
index 0144a5ef..b46923eb 100644
--- a/src/bluetooth/qbluetoothlocaldevice_android.cpp
+++ b/src/bluetooth/qbluetoothlocaldevice_android.cpp
@@ -54,25 +54,21 @@ Q_DECLARE_LOGGING_CATEGORY(QT_BT_ANDROID)
QBluetoothLocalDevicePrivate::QBluetoothLocalDevicePrivate(
QBluetoothLocalDevice *q, const QBluetoothAddress &address) :
- q_ptr(q),
- obj(0),
- pendingHostModeTransition(false)
+ q_ptr(q)
{
registerQBluetoothLocalDeviceMetaType();
initialize(address);
receiver = new LocalDeviceBroadcastReceiver(q_ptr);
- connect(receiver, SIGNAL(hostModeStateChanged(QBluetoothLocalDevice::HostMode)),
- this, SLOT(processHostModeChange(QBluetoothLocalDevice::HostMode)));
- connect(receiver, SIGNAL(pairingStateChanged(QBluetoothAddress,
- QBluetoothLocalDevice::Pairing)),
- this, SLOT(processPairingStateChanged(QBluetoothAddress,
- QBluetoothLocalDevice::Pairing)));
- connect(receiver, SIGNAL(connectDeviceChanges(QBluetoothAddress, bool)),
- this, SLOT(processConnectDeviceChanges(QBluetoothAddress, bool)));
- connect(receiver, SIGNAL(pairingDisplayConfirmation(QBluetoothAddress, QString)),
- this, SLOT(processDisplayConfirmation(QBluetoothAddress, QString)));
+ connect(receiver, &LocalDeviceBroadcastReceiver::hostModeStateChanged,
+ this, &QBluetoothLocalDevicePrivate::processHostModeChange);
+ connect(receiver, &LocalDeviceBroadcastReceiver::pairingStateChanged,
+ this, &QBluetoothLocalDevicePrivate::processPairingStateChanged);
+ connect(receiver, &LocalDeviceBroadcastReceiver::connectDeviceChanges,
+ this, &QBluetoothLocalDevicePrivate::processConnectDeviceChanges);
+ connect(receiver, &LocalDeviceBroadcastReceiver::pairingDisplayConfirmation,
+ this, &QBluetoothLocalDevicePrivate::processDisplayConfirmation);
connect(receiver, &LocalDeviceBroadcastReceiver::pairingDisplayPinCode,
this, &QBluetoothLocalDevicePrivate::processDisplayPinCode);
}
@@ -130,7 +126,7 @@ void QBluetoothLocalDevicePrivate::initialize(const QBluetoothAddress &address)
if (localAddress != address.toString()) {
// passed address not local one -> invalid
delete obj;
- obj = 0;
+ obj = nullptr;
}
}
}