diff options
-rw-r--r-- | desktop-widgets/btdeviceselectiondialog.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/desktop-widgets/btdeviceselectiondialog.cpp b/desktop-widgets/btdeviceselectiondialog.cpp index 2fa6b7679..94e07c969 100644 --- a/desktop-widgets/btdeviceselectiondialog.cpp +++ b/desktop-widgets/btdeviceselectiondialog.cpp @@ -233,6 +233,9 @@ void BtDeviceSelectionDialog::addRemoteDevice(const QBluetoothDeviceInfo &remote pairingStatusLabel = tr("AUTHORIZED_PAIRED"); pairingColor = QColor(Qt::blue); } + if (remoteDeviceInfo.address().isNull()) + pairingColor = QColor(Qt::gray); + QString deviceLabel = tr("%1 (%2) [State: %3]").arg(remoteDeviceInfo.name(), remoteDeviceInfo.address().toString(), @@ -264,6 +267,10 @@ void BtDeviceSelectionDialog::itemClicked(QListWidgetItem *item) .arg(remoteDeviceInfo.address().toString()); enableSaveButton = false; } + if (remoteDeviceInfo.address().isNull()) { + statusMessage = tr("A device needs a non-zero address for a connection."); + enableSaveButton = false; + } #endif // Update the status message and the save button ui->dialogStatus->setText(statusMessage); |