summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Jocke <j.bygdell@gmail.com>2018-10-02 19:54:54 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-10-09 21:04:23 -0700
commitc70225f5751326ef1d108c37fa032032c2cfca2d (patch)
treef68b0a6db3f48062764274bc8208d3a3da803ed5 /core
parent636505f8182a47a7c7cf3de9cb6a548ba4c32306 (diff)
downloadsubsurface-c70225f5751326ef1d108c37fa032032c2cfca2d.tar.gz
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>
Diffstat (limited to 'core')
-rw-r--r--core/downloadfromdcthread.cpp10
1 files changed, 5 insertions, 5 deletions
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