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
|
|
@ -9,7 +9,6 @@
|
|||
#include "membuffer.h"
|
||||
#include "subsurfacesysinfo.h"
|
||||
#include "version.h"
|
||||
#include "divecomputer.h"
|
||||
#include "errorhelper.h"
|
||||
#include "planner.h"
|
||||
#include "time.h"
|
||||
|
|
@ -527,16 +526,6 @@ void set_filename(const char *filename)
|
|||
existing_filename = copy_string(filename);
|
||||
}
|
||||
|
||||
QString get_dc_nickname(const char *model, uint32_t deviceid)
|
||||
{
|
||||
const DiveComputerNode *existNode = dcList.getExact(model, deviceid);
|
||||
|
||||
if (existNode && !existNode->nickName.isEmpty())
|
||||
return existNode->nickName;
|
||||
else
|
||||
return model;
|
||||
}
|
||||
|
||||
QString get_depth_string(int mm, bool showunit, bool showdecimal)
|
||||
{
|
||||
if (prefs.units.length == units::METERS) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue