Remove some duplicate code

Signed-off-by: Yihe Li <winmikedows@hotmail.com>
This commit is contained in:
Yihe Li 2025-06-05 16:15:29 +08:00
parent e4a801fdf7
commit ef3bf75715
No known key found for this signature in database
7 changed files with 31 additions and 50 deletions

View file

@ -203,8 +203,8 @@ shared_qobject_ptr<LogModel> LaunchTask::getLogModel()
{
if (!m_logModel) {
m_logModel.reset(new LogModel());
m_logModel->setMaxLines(m_instance->getConsoleMaxLines());
m_logModel->setStopOnOverflow(m_instance->shouldStopOnConsoleOverflow());
m_logModel->setMaxLines(getConsoleMaxLines(m_instance->settings()));
m_logModel->setStopOnOverflow(shouldStopOnConsoleOverflow(m_instance->settings()));
// FIXME: should this really be here?
m_logModel->setOverflowMessage(tr("Stopped watching the game log because the log length surpassed %1 lines.\n"
"You may have to fix your mods because the game is still logging to files and"