mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
cleanup: move formatting of gas type to string-format.cpp
Since the only caller was C++ code, this can be done in C++ code, which removes memory-management headaches. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
468c1d8d61
commit
264adacba1
5 changed files with 26 additions and 37 deletions
|
@ -355,12 +355,7 @@ QVariant DiveTripModelBase::diveData(const struct dive *d, int column, int role)
|
|||
case LOCATION:
|
||||
return QString(get_dive_location(d));
|
||||
case GAS:
|
||||
{
|
||||
char *gas_string = get_dive_gas_string(d);
|
||||
QString ret(gas_string);
|
||||
free(gas_string);
|
||||
return ret;
|
||||
}
|
||||
return formatDiveGasString(d);
|
||||
case NOTES:
|
||||
return QString(d->notes);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue