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:
parent
9f043f4a93
commit
14ca6a4e77
@ -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);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user