mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Use the address of the BTH device if its name is empty
There are moments when the name of the device is not collected properly and it is unavailable. Instead of showing an empty string then print the address of the device. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
13083fb524
commit
5f60a688c6
1 changed files with 7 additions and 1 deletions
|
@ -554,7 +554,13 @@ void DownloadFromDCWidget::bluetoothSelectionDialogIsFinished(int result)
|
|||
{
|
||||
if (result == QDialog::Accepted) {
|
||||
/* Make the selected Bluetooth device default */
|
||||
ui.device->setCurrentText(btDeviceSelectionDialog->getSelectedDeviceName());
|
||||
QString selectedDeviceName = btDeviceSelectionDialog->getSelectedDeviceName();
|
||||
|
||||
if (selectedDeviceName == NULL || selectedDeviceName.isEmpty()) {
|
||||
ui.device->setCurrentText(btDeviceSelectionDialog->getSelectedDeviceAddress());
|
||||
} else {
|
||||
ui.device->setCurrentText(selectedDeviceName);
|
||||
}
|
||||
} else if (result == QDialog::Rejected){
|
||||
/* Disable Bluetooth download mode */
|
||||
ui.bluetoothMode->setChecked(false);
|
||||
|
|
Loading…
Reference in a new issue