mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Qt6: update to newer APIs for QDateTime
Fortunately, these were already available in Qt5. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
6f46238fc4
commit
e29ecf2c9a
2 changed files with 6 additions and 6 deletions
|
@ -753,9 +753,9 @@ timestamp_t dateTimeToTimestamp(const QDateTime &t)
|
|||
QString render_seconds_to_string(int seconds)
|
||||
{
|
||||
if (seconds % 60 == 0)
|
||||
return QDateTime::fromTime_t(seconds).toUTC().toString("h:mm");
|
||||
return QDateTime::fromSecsSinceEpoch(seconds, Qt::UTC).toUTC().toString("h:mm");
|
||||
else
|
||||
return QDateTime::fromTime_t(seconds).toUTC().toString("h:mm:ss");
|
||||
return QDateTime::fromSecsSinceEpoch(seconds, Qt::UTC).toUTC().toString("h:mm:ss");
|
||||
}
|
||||
|
||||
int parseDurationToSeconds(const QString &text)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue