core: return std::string from get_dive_date_c_string()

Had to convert uemis-donwloader.c to C++. Lot's of
non-const clean code.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-03-02 09:12:21 +01:00 committed by Michael Keller
parent 203ff8b2e6
commit cca4c8cae5
7 changed files with 34 additions and 36 deletions

View file

@ -1007,10 +1007,9 @@ QString get_short_dive_date_string(timestamp_t when)
return loc.toString(ts.toUTC(), QString(prefs.date_format_short) + " " + prefs.time_format);
}
char *get_dive_date_c_string(timestamp_t when)
std::string get_dive_date_c_string(timestamp_t when)
{
QString text = get_short_dive_date_string(when);
return copy_qstring(text);
return get_short_dive_date_string(when).toStdString();
}
static QString get_dive_only_date_string(timestamp_t when)