summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothservicediscoveryagent_android.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bluetooth/qbluetoothservicediscoveryagent_android.cpp')
-rw-r--r--src/bluetooth/qbluetoothservicediscoveryagent_android.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/bluetooth/qbluetoothservicediscoveryagent_android.cpp b/src/bluetooth/qbluetoothservicediscoveryagent_android.cpp
index 7ab1f50c..ce2911d3 100644
--- a/src/bluetooth/qbluetoothservicediscoveryagent_android.cpp
+++ b/src/bluetooth/qbluetoothservicediscoveryagent_android.cpp
@@ -200,7 +200,7 @@ void QBluetoothServiceDiscoveryAgentPrivate::start(const QBluetoothAddress &addr
if (!receiver) {
receiver = new ServiceDiscoveryBroadcastReceiver();
QObject::connect(receiver, &ServiceDiscoveryBroadcastReceiver::uuidFetchFinished,
- [this](const QBluetoothAddress &address, const QList<QBluetoothUuid>& uuids) {
+ q, [this](const QBluetoothAddress &address, const QList<QBluetoothUuid>& uuids) {
this->_q_processFetchedUuids(address, uuids);
});
}
@@ -208,7 +208,7 @@ void QBluetoothServiceDiscoveryAgentPrivate::start(const QBluetoothAddress &addr
if (!localDeviceReceiver) {
localDeviceReceiver = new LocalDeviceBroadcastReceiver();
QObject::connect(localDeviceReceiver, &LocalDeviceBroadcastReceiver::hostModeStateChanged,
- [this](QBluetoothLocalDevice::HostMode state){
+ q, [this](QBluetoothLocalDevice::HostMode state){
this->_q_hostModeStateChanged(state);
});
}
@@ -250,7 +250,8 @@ void QBluetoothServiceDiscoveryAgentPrivate::_q_processFetchedUuids(
//could not find any service for the current address/device -> go to next one
if (address.isNull() || uuids.isEmpty()) {
if (discoveredDevices.count() == 1) {
- QTimer::singleShot(4000, qApp, [this]() {
+ Q_Q(QBluetoothServiceDiscoveryAgent);
+ QTimer::singleShot(4000, q, [this]() {
this->_q_fetchUuidsTimeout();
});
}
@@ -301,7 +302,8 @@ void QBluetoothServiceDiscoveryAgentPrivate::_q_processFetchedUuids(
//the discovery on the last device cannot immediately finish
//we have to grant the 2 seconds timeout delay
if (discoveredDevices.count() == 1) {
- QTimer::singleShot(4000, qApp, [this]() {
+ Q_Q(QBluetoothServiceDiscoveryAgent);
+ QTimer::singleShot(4000, q, [this]() {
this->_q_fetchUuidsTimeout();
});
return;