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:
Berthold Stoeger 2020-04-23 23:17:19 +02:00 committed by Dirk Hohndel
parent 3d4698c0a1
commit 9386eb2a0b
5 changed files with 13 additions and 14 deletions

View file

@ -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) {