summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2013-09-23 14:55:35 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-25 11:26:46 +0200
commit176d5208a3301ade9fea2b0681474dbff253b6a8 (patch)
treef8050c28a2e69d7d557b6dc638e127ebf9ef6ebf /examples
parent85de7d64e85aa058f1777bc9d1a778790b1d50a6 (diff)
Emit service discovery error during internal device discovery
This was discovered when starting a service discovery while no Bluetooth device is connected. Change-Id: Ibb970ee6cb95ff50bca635813cce23c4d7f8e3c6 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'examples')
-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()