From c70225f5751326ef1d108c37fa032032c2cfca2d Mon Sep 17 00:00:00 2001 From: Jocke Date: Tue, 2 Oct 2018 19:54:54 +0200 Subject: 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 --- core/downloadfromdcthread.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'core/downloadfromdcthread.cpp') diff --git a/core/downloadfromdcthread.cpp b/core/downloadfromdcthread.cpp index 95f6b7f75..a9c8ce70b 100644 --- a/core/downloadfromdcthread.cpp +++ b/core/downloadfromdcthread.cpp @@ -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 -- cgit v1.2.3-70-g09d2