mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
ExtractionOptions extractionOptions is no longer global in mainwindow.h
This commit is contained in:
@@ -38,12 +38,9 @@
|
|||||||
#include "mapsettings.h"
|
#include "mapsettings.h"
|
||||||
#include "playersettings.h"
|
#include "playersettings.h"
|
||||||
#include "validator.h"
|
#include "validator.h"
|
||||||
#include "resourceExtractor/ResourceConverter.h"
|
|
||||||
|
|
||||||
static CBasicLogConfigurator * logConfig;
|
static CBasicLogConfigurator * logConfig;
|
||||||
|
|
||||||
ExtractionOptions extractionOptions;
|
|
||||||
|
|
||||||
QJsonValue jsonFromPixmap(const QPixmap &p)
|
QJsonValue jsonFromPixmap(const QPixmap &p)
|
||||||
{
|
{
|
||||||
QBuffer buffer;
|
QBuffer buffer;
|
||||||
@@ -91,7 +88,7 @@ void MainWindow::saveUserSettings()
|
|||||||
s.setValue(mainWindowPositionSetting, pos());
|
s.setValue(mainWindowPositionSetting, pos());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::parseCommandLine()
|
void MainWindow::parseCommandLine(ExtractionOptions & extractionOptions)
|
||||||
{
|
{
|
||||||
QCommandLineParser parser;
|
QCommandLineParser parser;
|
||||||
parser.addHelpOption();
|
parser.addHelpOption();
|
||||||
@@ -131,7 +128,8 @@ MainWindow::MainWindow(QWidget* parent) :
|
|||||||
// This is important on Mac for relative paths to work inside DMG.
|
// This is important on Mac for relative paths to work inside DMG.
|
||||||
QDir::setCurrent(QApplication::applicationDirPath());
|
QDir::setCurrent(QApplication::applicationDirPath());
|
||||||
|
|
||||||
parseCommandLine();
|
ExtractionOptions extractionOptions;
|
||||||
|
parseCommandLine(extractionOptions);
|
||||||
|
|
||||||
//configure logging
|
//configure logging
|
||||||
const boost::filesystem::path logPath = VCMIDirs::get().userLogsPath() / "VCMI_Editor_log.txt";
|
const boost::filesystem::path logPath = VCMIDirs::get().userLogsPath() / "VCMI_Editor_log.txt";
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
#include <QStandardItemModel>
|
#include <QStandardItemModel>
|
||||||
#include "mapcontroller.h"
|
#include "mapcontroller.h"
|
||||||
#include "../lib/Terrain.h"
|
#include "../lib/Terrain.h"
|
||||||
|
#include "resourceExtractor/ResourceConverter.h"
|
||||||
|
|
||||||
class CMap;
|
class CMap;
|
||||||
class ObjectBrowser;
|
class ObjectBrowser;
|
||||||
@@ -129,7 +129,7 @@ private:
|
|||||||
void loadUserSettings();
|
void loadUserSettings();
|
||||||
void saveUserSettings();
|
void saveUserSettings();
|
||||||
|
|
||||||
void parseCommandLine();
|
void parseCommandLine(ExtractionOptions & extractionOptions);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::MainWindow * ui;
|
Ui::MainWindow * ui;
|
||||||
|
Reference in New Issue
Block a user