mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
cleanup: move get_dc_nickname from qthelper.cpp to divecomputer.cpp
1) qthelper is already huge. 2) set_dc_nickname et al. is already there. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
3d4698c0a1
commit
9386eb2a0b
5 changed files with 13 additions and 14 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue