diff options
Diffstat (limited to 'src/bluetooth/qlowenergycontroller_winrt.cpp')
-rw-r--r-- | src/bluetooth/qlowenergycontroller_winrt.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/bluetooth/qlowenergycontroller_winrt.cpp b/src/bluetooth/qlowenergycontroller_winrt.cpp index 5b14a92c..f69a0d91 100644 --- a/src/bluetooth/qlowenergycontroller_winrt.cpp +++ b/src/bluetooth/qlowenergycontroller_winrt.cpp @@ -642,10 +642,10 @@ void QLowEnergyControllerPrivateWinRT::discoverServiceDetails(const QBluetoothUu QThread *thread = new QThread; worker->moveToThread(thread); connect(thread, &QThread::started, worker, &QWinRTLowEnergyServiceHandler::obtainCharList); - connect(thread, &QThread::finished, thread, &QObject::deleteLater); connect(thread, &QThread::finished, worker, &QObject::deleteLater); - connect(worker, &QWinRTLowEnergyServiceHandler::charListObtained, - [this, thread](const QBluetoothUuid &service, QHash<QLowEnergyHandle, QLowEnergyServicePrivate::CharData> charList + connect(worker, &QObject::destroyed, thread, &QObject::deleteLater); + connect(worker, &QWinRTLowEnergyServiceHandler::charListObtained, this, + [this](const QBluetoothUuid &service, QHash<QLowEnergyHandle, QLowEnergyServicePrivate::CharData> charList , QVector<QBluetoothUuid> indicateChars , QLowEnergyHandle startHandle, QLowEnergyHandle endHandle) { if (!serviceList.contains(service)) { @@ -668,7 +668,6 @@ void QLowEnergyControllerPrivateWinRT::discoverServiceDetails(const QBluetoothUu Q_ASSERT_SUCCEEDED(hr); pointer->setState(QLowEnergyService::ServiceDiscovered); - thread->exit(0); }); thread->start(); } |