Remove deadcode.

pull/593/head
fredzio 4 years ago
parent 45f4e69a19
commit dbdd397716

@ -10,11 +10,9 @@
#include <cmath> #include <cmath>
Launcher::AdvancedPage::AdvancedPage(Files::ConfigurationManager &cfg, Launcher::AdvancedPage::AdvancedPage(Config::GameSettings &gameSettings,
Config::GameSettings &gameSettings,
Settings::Manager &engineSettings, QWidget *parent) Settings::Manager &engineSettings, QWidget *parent)
: QWidget(parent) : QWidget(parent)
, mCfgMgr(cfg)
, mGameSettings(gameSettings) , mGameSettings(gameSettings)
, mEngineSettings(engineSettings) , mEngineSettings(engineSettings)
{ {

@ -9,7 +9,6 @@
#include <components/settings/settings.hpp> #include <components/settings/settings.hpp>
namespace Files { struct ConfigurationManager; }
namespace Config { class GameSettings; } namespace Config { class GameSettings; }
namespace Launcher namespace Launcher
@ -19,7 +18,7 @@ namespace Launcher
Q_OBJECT Q_OBJECT
public: public:
AdvancedPage(Files::ConfigurationManager &cfg, Config::GameSettings &gameSettings, AdvancedPage(Config::GameSettings &gameSettings,
Settings::Manager &engineSettings, QWidget *parent = nullptr); Settings::Manager &engineSettings, QWidget *parent = nullptr);
bool loadSettings(); bool loadSettings();
@ -35,7 +34,6 @@ namespace Launcher
void slotViewOverShoulderToggled(bool checked); void slotViewOverShoulderToggled(bool checked);
private: private:
Files::ConfigurationManager &mCfgMgr;
Config::GameSettings &mGameSettings; Config::GameSettings &mGameSettings;
Settings::Manager &mEngineSettings; Settings::Manager &mEngineSettings;
QCompleter mCellNameCompleter; QCompleter mCellNameCompleter;

@ -88,11 +88,7 @@ namespace Launcher
QStringList previousSelectedFiles; QStringList previousSelectedFiles;
QString mDataLocal; QString mDataLocal;
void setPluginsCheckstates(Qt::CheckState state);
void buildView(); void buildView();
void setupConfig();
void readConfig();
void setProfile (int index, bool savePrevious); void setProfile (int index, bool savePrevious);
void setProfile (const QString &previous, const QString &current, bool savePrevious); void setProfile (const QString &previous, const QString &current, bool savePrevious);
void removeProfile (const QString &profile); void removeProfile (const QString &profile);

@ -29,9 +29,8 @@ QString getAspect(int x, int y)
return QString(QString::number(xaspect) + ":" + QString::number(yaspect)); return QString(QString::number(xaspect) + ":" + QString::number(yaspect));
} }
Launcher::GraphicsPage::GraphicsPage(Files::ConfigurationManager &cfg, Settings::Manager &engineSettings, QWidget *parent) Launcher::GraphicsPage::GraphicsPage(Settings::Manager &engineSettings, QWidget *parent)
: QWidget(parent) : QWidget(parent)
, mCfgMgr(cfg)
, mEngineSettings(engineSettings) , mEngineSettings(engineSettings)
{ {
setObjectName ("GraphicsPage"); setObjectName ("GraphicsPage");

@ -20,7 +20,7 @@ namespace Launcher
Q_OBJECT Q_OBJECT
public: public:
GraphicsPage(Files::ConfigurationManager &cfg, Settings::Manager &engineSettings, QWidget *parent = nullptr); GraphicsPage(Settings::Manager &engineSettings, QWidget *parent = nullptr);
void saveSettings(); void saveSettings();
bool loadSettings(); bool loadSettings();
@ -35,7 +35,6 @@ namespace Launcher
void slotShadowDistLimitToggled(bool checked); void slotShadowDistLimitToggled(bool checked);
private: private:
Files::ConfigurationManager &mCfgMgr;
Settings::Manager &mEngineSettings; Settings::Manager &mEngineSettings;
QVector<QStringList> mResolutionsPerScreen; QVector<QStringList> mResolutionsPerScreen;

@ -126,9 +126,9 @@ void Launcher::MainDialog::createPages()
mPlayPage = new PlayPage(this); mPlayPage = new PlayPage(this);
mDataFilesPage = new DataFilesPage(mCfgMgr, mGameSettings, mLauncherSettings, this); mDataFilesPage = new DataFilesPage(mCfgMgr, mGameSettings, mLauncherSettings, this);
mGraphicsPage = new GraphicsPage(mCfgMgr, mEngineSettings, this); mGraphicsPage = new GraphicsPage(mEngineSettings, this);
mSettingsPage = new SettingsPage(mCfgMgr, mGameSettings, mLauncherSettings, this); mSettingsPage = new SettingsPage(mCfgMgr, mGameSettings, mLauncherSettings, this);
mAdvancedPage = new AdvancedPage(mCfgMgr, mGameSettings, mEngineSettings, this); mAdvancedPage = new AdvancedPage(mGameSettings, mEngineSettings, this);
// Set the combobox of the play page to imitate the combobox on the datafilespage // Set the combobox of the play page to imitate the combobox on the datafilespage
mPlayPage->setProfilesModel(mDataFilesPage->profilesModel()); mPlayPage->setProfilesModel(mDataFilesPage->profilesModel());

@ -45,4 +45,5 @@ QString CellNameLoader::getCellName(ESM::ESMReader &esmReader)
cell.loadNameAndData(esmReader, isDeleted); cell.loadNameAndData(esmReader, isDeleted);
return QString::fromStdString(cell.mName); return QString::fromStdString(cell.mName);
} }

@ -14,8 +14,6 @@ Config::GameSettings::GameSettings(Files::ConfigurationManager &cfg)
{ {
} }
Config::GameSettings::~GameSettings() = default;
void Config::GameSettings::validatePaths() void Config::GameSettings::validatePaths()
{ {
QStringList paths = mSettings.values(QString("data")); QStringList paths = mSettings.values(QString("data"));

@ -21,7 +21,6 @@ namespace Config
{ {
public: public:
GameSettings(Files::ConfigurationManager &cfg); GameSettings(Files::ConfigurationManager &cfg);
~GameSettings();
inline QString value(const QString &key, const QString &defaultValue = QString()) inline QString value(const QString &key, const QString &defaultValue = QString())
{ {
@ -54,11 +53,11 @@ namespace Config
mUserSettings.remove(key); mUserSettings.remove(key);
} }
inline QStringList getDataDirs() { return mDataDirs; } inline QStringList getDataDirs() const { return mDataDirs; }
inline void removeDataDir(const QString &dir) { if(!dir.isEmpty()) mDataDirs.removeAll(dir); } inline void removeDataDir(const QString &dir) { if(!dir.isEmpty()) mDataDirs.removeAll(dir); }
inline void addDataDir(const QString &dir) { if(!dir.isEmpty()) mDataDirs.append(dir); } inline void addDataDir(const QString &dir) { if(!dir.isEmpty()) mDataDirs.append(dir); }
inline QString getDataLocal() {return mDataLocal; } inline QString getDataLocal() const {return mDataLocal; }
bool hasMaster(); bool hasMaster();

@ -12,10 +12,6 @@ const char Config::LauncherSettings::sLauncherConfigFileName[] = "launcher.cfg";
const char Config::LauncherSettings::sContentListsSectionPrefix[] = "Profiles/"; const char Config::LauncherSettings::sContentListsSectionPrefix[] = "Profiles/";
const char Config::LauncherSettings::sContentListSuffix[] = "/content"; const char Config::LauncherSettings::sContentListSuffix[] = "/content";
Config::LauncherSettings::LauncherSettings() = default;
Config::LauncherSettings::~LauncherSettings() = default;
QStringList Config::LauncherSettings::subKeys(const QString &key) QStringList Config::LauncherSettings::subKeys(const QString &key)
{ {
QMultiMap<QString, QString> settings = SettingsBase::getSettings(); QMultiMap<QString, QString> settings = SettingsBase::getSettings();

@ -9,9 +9,6 @@ namespace Config
class LauncherSettings : public SettingsBase<QMultiMap<QString, QString> > class LauncherSettings : public SettingsBase<QMultiMap<QString, QString> >
{ {
public: public:
LauncherSettings();
~LauncherSettings();
bool writeFile(QTextStream &stream); bool writeFile(QTextStream &stream);
/// \return names of all Content Lists in the launcher's .cfg file. /// \return names of all Content Lists in the launcher's .cfg file.

Loading…
Cancel
Save