1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Remove console global

This commit is contained in:
Ivan Savenko
2025-02-27 23:10:11 +00:00
parent e5a095a237
commit 782362e5ce
12 changed files with 105 additions and 97 deletions

View File

@@ -31,9 +31,12 @@ void MainWindow::load()
QDir::setCurrent(QApplication::applicationDirPath());
#ifndef VCMI_MOBILE
console = new CConsoleHandler();
console = std::make_unique<CConsoleHandler>();
CBasicLogConfigurator logConfig(VCMIDirs::get().userLogsPath() / "VCMI_Launcher_log.txt", console.get());
#else
CBasicLogConfigurator logConfig(VCMIDirs::get().userLogsPath() / "VCMI_Launcher_log.txt", nullptr);
#endif
CBasicLogConfigurator logConfig(VCMIDirs::get().userLogsPath() / "VCMI_Launcher_log.txt", console);
logConfig.configureDefault();
try