summaryrefslogtreecommitdiffstats
path: root/examples/bluetooth/btchat/remoteselector.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/bluetooth/btchat/remoteselector.cpp')
-rw-r--r--examples/bluetooth/btchat/remoteselector.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/bluetooth/btchat/remoteselector.cpp b/examples/bluetooth/btchat/remoteselector.cpp
index 73f56a54..e6fd728f 100644
--- a/examples/bluetooth/btchat/remoteselector.cpp
+++ b/examples/bluetooth/btchat/remoteselector.cpp
@@ -57,6 +57,7 @@ RemoteSelector::RemoteSelector(const QBluetoothAddress &localAdapter, QWidget *p
connect(m_discoveryAgent, SIGNAL(serviceDiscovered(QBluetoothServiceInfo)),
this, SLOT(serviceDiscovered(QBluetoothServiceInfo)));
connect(m_discoveryAgent, SIGNAL(finished()), this, SLOT(discoveryFinished()));
+ connect(m_discoveryAgent, SIGNAL(canceled()), this, SLOT(discoveryFinished()));
}
RemoteSelector::~RemoteSelector()
@@ -67,6 +68,7 @@ RemoteSelector::~RemoteSelector()
void RemoteSelector::startDiscovery(const QBluetoothUuid &uuid)
{
+ ui->status->setText(tr("Scanning..."));
if (m_discoveryAgent->isActive())
m_discoveryAgent->stop();
@@ -75,7 +77,6 @@ void RemoteSelector::startDiscovery(const QBluetoothUuid &uuid)
m_discoveryAgent->setUuidFilter(uuid);
m_discoveryAgent->start();
- ui->status->setText(tr("Scanning..."));
}
void RemoteSelector::stopDiscovery()