summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Claudiu Olteanu <olteanu.claudiu@ymail.com>2015-08-18 20:12:15 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-08-20 22:45:07 -0700
commit14ca6a4e77ff595135204bc429ec31ad10da0368 (patch)
tree81907b0e9d13dc4b3e3605d5bd02caa20244e4eb
parent9f043f4a933485de8dccff0e0d50fd0666b1af38 (diff)
downloadsubsurface-14ca6a4e77ff595135204bc429ec31ad10da0368.tar.gz
Check the last error when the BTH device scanning is finished
If there is no error reported when the device scanning is finished then report to the dialog status that the scanning finished successfully. Otherwise report the last error. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/btdeviceselectiondialog.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/qt-ui/btdeviceselectiondialog.cpp b/qt-ui/btdeviceselectiondialog.cpp
index ce759ccba..3af2501e2 100644
--- a/qt-ui/btdeviceselectiondialog.cpp
+++ b/qt-ui/btdeviceselectiondialog.cpp
@@ -124,7 +124,12 @@ void BtDeviceSelectionDialog::on_scan_clicked()
void BtDeviceSelectionDialog::remoteDeviceScanFinished()
{
- ui->dialogStatus->setText("Scanning finished.");
+ if (remoteDeviceDiscoveryAgent->error() == QBluetoothDeviceDiscoveryAgent::NoError) {
+ ui->dialogStatus->setText("Scanning finished successfully.");
+ } else {
+ deviceDiscoveryError(remoteDeviceDiscoveryAgent->error());
+ }
+
ui->scan->setEnabled(true);
}