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>
This commit is contained in:
Claudiu Olteanu 2015-08-18 20:12:15 +03:00 committed by Dirk Hohndel
parent 9f043f4a93
commit 14ca6a4e77

View file

@ -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);
}