1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-03 00:46: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

@ -184,14 +184,14 @@ MainWindow::MainWindow(QWidget* parent) :
//configure logging
const boost::filesystem::path logPath = VCMIDirs::get().userLogsPath() / "VCMI_Editor_log.txt";
console = new CConsoleHandler();
logConfig = new CBasicLogConfigurator(logPath, console);
console = std::make_unique<CConsoleHandler>();
logConfig = new CBasicLogConfigurator(logPath, console.get());
logConfig->configureDefault();
logGlobal->info("Starting map editor of '%s'", GameConstants::VCMI_VERSION);
logGlobal->info("The log file will be saved to %s", logPath);
//init
preinitDLL(::console, extractionOptions.extractArchives);
preinitDLL(extractionOptions.extractArchives);
// Initialize logging based on settings
logConfig->configure();