Mobile RememberDCs: save device address

By saving the device address together with the vendor and product we fix the 
corner case where a user with two DCs would not get quick select buttons if they
where the same vendor and model.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
This commit is contained in:
Jocke 2018-10-02 19:54:54 +02:00 committed by Dirk Hohndel
parent 636505f818
commit c70225f575

View file

@ -27,12 +27,12 @@ static QString str_error(const char *fmt, ...)
static void updateRememberedDCs()
{
QString current = qPrefDiveComputer::vendor() + " - " + qPrefDiveComputer::product();
QString current = qPrefDiveComputer::vendor() + " - " + qPrefDiveComputer::product() + " - " + qPrefDiveComputer::device();
QStringList dcs = {
qPrefDiveComputer::vendor1() + " - " + qPrefDiveComputer::product1(),
qPrefDiveComputer::vendor2() + " - " + qPrefDiveComputer::product2(),
qPrefDiveComputer::vendor3() + " - " + qPrefDiveComputer::product3(),
qPrefDiveComputer::vendor4() + " - " + qPrefDiveComputer::product4()
qPrefDiveComputer::vendor1() + " - " + qPrefDiveComputer::product1() + " - " + qPrefDiveComputer::device1(),
qPrefDiveComputer::vendor2() + " - " + qPrefDiveComputer::product2() + " - " + qPrefDiveComputer::device2(),
qPrefDiveComputer::vendor3() + " - " + qPrefDiveComputer::product3() + " - " + qPrefDiveComputer::device3(),
qPrefDiveComputer::vendor4() + " - " + qPrefDiveComputer::product4() + " - " + qPrefDiveComputer::device4()
};
if (dcs.contains(current))
// already in the list