aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/btdeviceselectiondialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/btdeviceselectiondialog.cpp')
-rw-r--r--desktop-widgets/btdeviceselectiondialog.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/desktop-widgets/btdeviceselectiondialog.cpp b/desktop-widgets/btdeviceselectiondialog.cpp
index 8077298f6..62558465f 100644
--- a/desktop-widgets/btdeviceselectiondialog.cpp
+++ b/desktop-widgets/btdeviceselectiondialog.cpp
@@ -194,11 +194,12 @@ void BtDeviceSelectionDialog::on_scan_clicked()
void BtDeviceSelectionDialog::remoteDeviceScanFinished()
{
- if (remoteDeviceDiscoveryAgent->error() == QBluetoothDeviceDiscoveryAgent::NoError) {
+ // This check is not necessary for Qt's QBluetoothDeviceDiscoveryAgent,
+ // but with the home-brew WinBluetoothDeviceDiscoveryAgent, on error we
+ // get an error() and an finished() signal. Thus, don't overwrite the
+ // error message with a success message.
+ if (remoteDeviceDiscoveryAgent->error() == QBluetoothDeviceDiscoveryAgent::NoError)
ui->dialogStatus->setText(tr("Scanning finished successfully."));
- } else {
- deviceDiscoveryError(remoteDeviceDiscoveryAgent->error());
- }
ui->scan->setEnabled(true);
}