mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix divecomputer nickname handling
Don't overwrite existing data. [Dirk Hohndel: rewrote this a litte, but the logic is the same] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ca6f2c238a
commit
09ded17e1c
2 changed files with 29 additions and 12 deletions
|
@ -12,6 +12,7 @@ public:
|
|||
bool operator==(const DiveComputerNode &a) const;
|
||||
bool operator!=(const DiveComputerNode &a) const;
|
||||
bool changesValues(const DiveComputerNode &b) const;
|
||||
void showchanges(const QString &n, const QString &s, const QString &f) const;
|
||||
QString model;
|
||||
uint32_t deviceId;
|
||||
QString serialNumber;
|
||||
|
@ -25,7 +26,7 @@ public:
|
|||
~DiveComputerList();
|
||||
const DiveComputerNode *getExact(const QString &m, uint32_t d);
|
||||
const DiveComputerNode *get(const QString &m);
|
||||
void addDC(const QString &m, uint32_t d, const QString &n = QString(), const QString &s = QString(), const QString &f = QString());
|
||||
void addDC(QString m, uint32_t d, QString n = QString(), QString s = QString(), QString f = QString());
|
||||
DiveComputerNode matchDC(const QString &m, uint32_t d);
|
||||
DiveComputerNode matchModel(const QString &m);
|
||||
QMultiMap<QString, DiveComputerNode> dcMap;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue