Substring match BT address

Since a known DC will have the name prepended to the BT/BLE addresss
we need to substring match the BT address.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
This commit is contained in:
Jocke 2018-10-09 18:40:28 +02:00 committed by Dirk Hohndel
parent c70225f575
commit 0f588f5227

View file

@ -53,6 +53,6 @@ void ConnectionListModel::removeAllAddresses()
int ConnectionListModel::indexOf(QString address) int ConnectionListModel::indexOf(QString address)
{ {
const QRegExp re(address, Qt::CaseInsensitive); const QRegExp re(".*" + address + ".*", Qt::CaseInsensitive);
return m_addresses.indexOf(re); return m_addresses.indexOf(re);
} }