From bf556da81a292d5c13a582f8dd489fc38c8f9bfb Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 13 Jan 2021 14:33:12 -0800 Subject: [PATCH] core/bluetooth: make device discovery less noisy This mainly combines reasonably redundant text to make the output easier to read. Signed-off-by: Dirk Hohndel --- core/btdiscovery.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/btdiscovery.cpp b/core/btdiscovery.cpp index a979bd2d9..e6f45b7b3 100644 --- a/core/btdiscovery.cpp +++ b/core/btdiscovery.cpp @@ -308,10 +308,11 @@ void BTDiscovery::btDeviceDiscoveredMain(const btPairedDevice &device, bool from else newDevice = device.name; - qDebug() << (fromPaired ? "Paired device" : "Discovered new device:") << newDevice << device.address; + QString msg; + msg = QString("%1 device: '%2' [%3]: ").arg(fromPaired ? "Paired" : "Discovered new").arg(newDevice).arg(device.address); if (newDC) { QString vendor = dc_descriptor_get_vendor(newDC); - qDebug() << "this could be a " + vendor + " " + newDevice; + qDebug() << msg << "this could be a " + vendor; btVP.btpdi = device; btVP.dcDescriptor = newDC; btVP.vendorIdx = vendorList.indexOf(vendor); @@ -326,7 +327,7 @@ void BTDiscovery::btDeviceDiscoveredMain(const btPairedDevice &device, bool from newDevice += " "; connectionListModel.addAddress(newDevice + device.address); } - qDebug() << "Not recognized as dive computer"; + qDebug() << msg << "not recognized as dive computer"; } QList BTDiscovery::getBtDcs()