diff options
Diffstat (limited to 'core/divecomputer.cpp')
-rw-r--r-- | core/divecomputer.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/divecomputer.cpp b/core/divecomputer.cpp index daa4eafbf..f97d5e27c 100644 --- a/core/divecomputer.cpp +++ b/core/divecomputer.cpp @@ -158,3 +158,13 @@ extern "C" void set_dc_nickname(struct dive *dive) } } } + +QString get_dc_nickname(const struct divecomputer *dc) +{ + const DiveComputerNode *existNode = dcList.getExact(dc->model, dc->deviceid); + + if (existNode && !existNode->nickName.isEmpty()) + return existNode->nickName; + else + return dc->model; +} |