core: remove unused function getDetectedDeviceAddress()

getDetectedDeviceAddress is not used in mobile or desktop version

Signed-off-by: Jan Iversen <jani@apache.org>
This commit is contained in:
jan Iversen 2018-06-04 18:44:41 +02:00 committed by Dirk Hohndel
parent 03f30f6281
commit efab7e3357
2 changed files with 0 additions and 17 deletions

View file

@ -438,19 +438,3 @@ int DCDeviceData::getDetectedProductIndex(const QString &currentVendorText)
#endif
return -1;
}
QString DCDeviceData::getDetectedDeviceAddress(const QString &currentProductText)
{
#if defined(BT_SUPPORT)
// Pull the vendor from the found devices that are possible real dive computers
// HACK: this assumes that dive computer names are unique across vendors
// and will only give you the first of multiple identically named dive computers
QList<BTDiscovery::btVendorProduct> btDCs = BTDiscovery::instance()->getBtDcs();
BTDiscovery::btVendorProduct btDC;
Q_FOREACH(btDC, btDCs) {
if (currentProductText.startsWith(dc_descriptor_get_product(btDC.dcDescriptor)))
return btDC.btpdi.address;
}
#endif
return QStringLiteral("cannot determine address of dive computer");
}

View file

@ -52,7 +52,6 @@ public:
Q_INVOKABLE int getDetectedVendorIndex();
Q_INVOKABLE int getDetectedProductIndex(const QString &currentVendorText);
Q_INVOKABLE QString getDetectedDeviceAddress(const QString &currentProductText);
public slots:
void setVendor(const QString& vendor);