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

@ -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;
}