diff --git a/mapeditor/mainwindow.cpp b/mapeditor/mainwindow.cpp index f2e627f90..a37ba74c6 100644 --- a/mapeditor/mainwindow.cpp +++ b/mapeditor/mainwindow.cpp @@ -38,12 +38,9 @@ #include "mapsettings.h" #include "playersettings.h" #include "validator.h" -#include "resourceExtractor/ResourceConverter.h" static CBasicLogConfigurator * logConfig; -ExtractionOptions extractionOptions; - QJsonValue jsonFromPixmap(const QPixmap &p) { QBuffer buffer; @@ -91,7 +88,7 @@ void MainWindow::saveUserSettings() s.setValue(mainWindowPositionSetting, pos()); } -void MainWindow::parseCommandLine() +void MainWindow::parseCommandLine(ExtractionOptions & extractionOptions) { QCommandLineParser parser; parser.addHelpOption(); @@ -131,7 +128,8 @@ MainWindow::MainWindow(QWidget* parent) : // This is important on Mac for relative paths to work inside DMG. QDir::setCurrent(QApplication::applicationDirPath()); - parseCommandLine(); + ExtractionOptions extractionOptions; + parseCommandLine(extractionOptions); //configure logging const boost::filesystem::path logPath = VCMIDirs::get().userLogsPath() / "VCMI_Editor_log.txt"; diff --git a/mapeditor/mainwindow.h b/mapeditor/mainwindow.h index 5c419f74e..3028c6b25 100644 --- a/mapeditor/mainwindow.h +++ b/mapeditor/mainwindow.h @@ -5,7 +5,7 @@ #include #include "mapcontroller.h" #include "../lib/Terrain.h" - +#include "resourceExtractor/ResourceConverter.h" class CMap; class ObjectBrowser; @@ -129,7 +129,7 @@ private: void loadUserSettings(); void saveUserSettings(); - void parseCommandLine(); + void parseCommandLine(ExtractionOptions & extractionOptions); private: Ui::MainWindow * ui;