[Game] Move formatElapsedTime helper out of public slots (#2202)

The message log needs the HH:MM:SS formatter used by the game timer, but
it lives in GameState's public slots, tying a pure formatting helper to
the signal-slot machinery.

Move formatElapsedTime into a public section of GameState so the log can
call it directly, and add the missing trailing newline to game_state.cpp.
This commit is contained in:
Lukas Brübach 2026-09-06 12:43:02 +02:00
parent 9dac371ead
commit bd7190f03c
2 changed files with 3 additions and 1 deletions

View file

@ -42,4 +42,4 @@ QString GameState::formatElapsedTime(int _secondsElapsed)
return QString::number(hours).rightJustified(2, '0') + ":" + QString::number(minutes).rightJustified(2, '0') + ":" +
QString::number(seconds).rightJustified(2, '0');
}
}

View file

@ -125,6 +125,8 @@ signals:
public slots:
void incrementGameTime();
void setGameTime(int _secondsElapsed);
public:
static QString formatElapsedTime(int _secondsElapsed);
private: