From 14ca6a4e77ff595135204bc429ec31ad10da0368 Mon Sep 17 00:00:00 2001 From: Claudiu Olteanu Date: Tue, 18 Aug 2015 20:12:15 +0300 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/btdeviceselectiondialog.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'qt-ui') 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); } -- cgit v1.2.3-70-g09d2