mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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:
parent
636505f818
commit
c70225f575
1 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue