summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/bluetooth/qbluetoothdevicediscoveryagent_p.h1
-rw-r--r--src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp17
2 files changed, 1 insertions, 17 deletions
diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent_p.h b/src/bluetooth/qbluetoothdevicediscoveryagent_p.h
index 45764c1a..7b57abb2 100644
--- a/src/bluetooth/qbluetoothdevicediscoveryagent_p.h
+++ b/src/bluetooth/qbluetoothdevicediscoveryagent_p.h
@@ -163,7 +163,6 @@ private:
private slots:
void registerDevice(const QBluetoothDeviceInfo &info);
void onScanFinished();
- void onScanCanceled();
private:
void disconnectAndClearWorker();
diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp b/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp
index d8d68d4b..1aaaf0a4 100644
--- a/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp
+++ b/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp
@@ -109,7 +109,6 @@ public slots:
Q_SIGNALS:
void deviceFound(const QBluetoothDeviceInfo &info);
void scanFinished();
- void scanCanceled();
public:
quint8 requestedModes;
@@ -250,10 +249,7 @@ void QWinRTBluetoothDeviceDiscoveryWorker::setupLEDeviceWatcher()
void QWinRTBluetoothDeviceDiscoveryWorker::handleLeTimeout()
{
- if (m_pendingPairedDevices == 0)
- emit scanFinished();
- else
- emit scanCanceled();
+ emit scanFinished();
deleteLater();
}
@@ -552,8 +548,6 @@ void QBluetoothDeviceDiscoveryAgentPrivate::start(QBluetoothDeviceDiscoveryAgent
this, &QBluetoothDeviceDiscoveryAgentPrivate::registerDevice);
connect(worker, &QWinRTBluetoothDeviceDiscoveryWorker::scanFinished,
this, &QBluetoothDeviceDiscoveryAgentPrivate::onScanFinished);
- connect(worker, &QWinRTBluetoothDeviceDiscoveryWorker::scanCanceled,
- this, &QBluetoothDeviceDiscoveryAgentPrivate::onScanCanceled);
worker->start();
if (lowEnergySearchTimeout > 0 && methods & QBluetoothDeviceDiscoveryAgent::LowEnergyMethod) { // otherwise no timeout and stop() required
@@ -613,21 +607,12 @@ void QBluetoothDeviceDiscoveryAgentPrivate::onScanFinished()
emit q->finished();
}
-void QBluetoothDeviceDiscoveryAgentPrivate::onScanCanceled()
-{
- Q_Q(QBluetoothDeviceDiscoveryAgent);
- disconnectAndClearWorker();
- emit q->canceled();
-}
-
void QBluetoothDeviceDiscoveryAgentPrivate::disconnectAndClearWorker()
{
Q_Q(QBluetoothDeviceDiscoveryAgent);
if (!worker)
return;
- disconnect(worker, &QWinRTBluetoothDeviceDiscoveryWorker::scanCanceled,
- this, &QBluetoothDeviceDiscoveryAgentPrivate::onScanCanceled);
disconnect(worker, &QWinRTBluetoothDeviceDiscoveryWorker::scanFinished,
this, &QBluetoothDeviceDiscoveryAgentPrivate::onScanFinished);
disconnect(worker, &QWinRTBluetoothDeviceDiscoveryWorker::deviceFound,