From f35a0f3b09197b56a7ecdd63a6689d8b69b36ce8 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 12 Feb 2019 07:35:35 -0800 Subject: Desktop: only show dive computers in the Bluetooth device list By default we'll only show devices that we believe to be dive computers, but the user can override that with the recently introduced check box. Signed-off-by: Dirk Hohndel --- desktop-widgets/btdeviceselectiondialog.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'desktop-widgets') diff --git a/desktop-widgets/btdeviceselectiondialog.cpp b/desktop-widgets/btdeviceselectiondialog.cpp index 23e965dab..bf56005d3 100644 --- a/desktop-widgets/btdeviceselectiondialog.cpp +++ b/desktop-widgets/btdeviceselectiondialog.cpp @@ -172,6 +172,9 @@ void BtDeviceSelectionDialog::hostModeStateChanged(QBluetoothLocalDevice::HostMo void BtDeviceSelectionDialog::addRemoteDevice(const QBluetoothDeviceInfo &remoteDeviceInfo) { + // are we supposed to show all devices or just dive computers? + if (!ui->showNonDivecomputers->isChecked() && !matchesKnownDiveComputerNames(remoteDeviceInfo.name())) + return; #if defined(Q_OS_WIN) // On Windows we cannot obtain the pairing status so we set only the name and the address of the device QString deviceLabel = QString("%1 (%2)").arg(remoteDeviceInfo.name(), -- cgit v1.2.3-70-g09d2