From dbdd397716b366baf492f21af3a71ed12e885e0d Mon Sep 17 00:00:00 2001 From: fredzio Date: Fri, 1 Jan 2021 16:54:45 +0100 Subject: [PATCH] Remove deadcode. --- apps/launcher/advancedpage.cpp | 4 +--- apps/launcher/advancedpage.hpp | 4 +--- apps/launcher/datafilespage.hpp | 4 ---- apps/launcher/graphicspage.cpp | 3 +-- apps/launcher/graphicspage.hpp | 3 +-- apps/launcher/maindialog.cpp | 4 ++-- apps/launcher/utils/cellnameloader.cpp | 3 ++- components/config/gamesettings.cpp | 2 -- components/config/gamesettings.hpp | 5 ++--- components/config/launchersettings.cpp | 4 ---- components/config/launchersettings.hpp | 3 --- 11 files changed, 10 insertions(+), 29 deletions(-) diff --git a/apps/launcher/advancedpage.cpp b/apps/launcher/advancedpage.cpp index ed0407235..6f59ade7a 100644 --- a/apps/launcher/advancedpage.cpp +++ b/apps/launcher/advancedpage.cpp @@ -10,11 +10,9 @@ #include -Launcher::AdvancedPage::AdvancedPage(Files::ConfigurationManager &cfg, - Config::GameSettings &gameSettings, +Launcher::AdvancedPage::AdvancedPage(Config::GameSettings &gameSettings, Settings::Manager &engineSettings, QWidget *parent) : QWidget(parent) - , mCfgMgr(cfg) , mGameSettings(gameSettings) , mEngineSettings(engineSettings) { diff --git a/apps/launcher/advancedpage.hpp b/apps/launcher/advancedpage.hpp index ef2f4740f..a373fae43 100644 --- a/apps/launcher/advancedpage.hpp +++ b/apps/launcher/advancedpage.hpp @@ -9,7 +9,6 @@ #include -namespace Files { struct ConfigurationManager; } namespace Config { class GameSettings; } namespace Launcher @@ -19,7 +18,7 @@ namespace Launcher Q_OBJECT public: - AdvancedPage(Files::ConfigurationManager &cfg, Config::GameSettings &gameSettings, + AdvancedPage(Config::GameSettings &gameSettings, Settings::Manager &engineSettings, QWidget *parent = nullptr); bool loadSettings(); @@ -35,7 +34,6 @@ namespace Launcher void slotViewOverShoulderToggled(bool checked); private: - Files::ConfigurationManager &mCfgMgr; Config::GameSettings &mGameSettings; Settings::Manager &mEngineSettings; QCompleter mCellNameCompleter; diff --git a/apps/launcher/datafilespage.hpp b/apps/launcher/datafilespage.hpp index 92984847e..3d200e6d2 100644 --- a/apps/launcher/datafilespage.hpp +++ b/apps/launcher/datafilespage.hpp @@ -88,11 +88,7 @@ namespace Launcher QStringList previousSelectedFiles; QString mDataLocal; - void setPluginsCheckstates(Qt::CheckState state); - void buildView(); - void setupConfig(); - void readConfig(); void setProfile (int index, bool savePrevious); void setProfile (const QString &previous, const QString ¤t, bool savePrevious); void removeProfile (const QString &profile); diff --git a/apps/launcher/graphicspage.cpp b/apps/launcher/graphicspage.cpp index d7e7eabc5..d1cf3aa6f 100644 --- a/apps/launcher/graphicspage.cpp +++ b/apps/launcher/graphicspage.cpp @@ -29,9 +29,8 @@ QString getAspect(int x, int y) 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) - , mCfgMgr(cfg) , mEngineSettings(engineSettings) { setObjectName ("GraphicsPage"); diff --git a/apps/launcher/graphicspage.hpp b/apps/launcher/graphicspage.hpp index 55178e0d7..35f711500 100644 --- a/apps/launcher/graphicspage.hpp +++ b/apps/launcher/graphicspage.hpp @@ -20,7 +20,7 @@ namespace Launcher Q_OBJECT public: - GraphicsPage(Files::ConfigurationManager &cfg, Settings::Manager &engineSettings, QWidget *parent = nullptr); + GraphicsPage(Settings::Manager &engineSettings, QWidget *parent = nullptr); void saveSettings(); bool loadSettings(); @@ -35,7 +35,6 @@ namespace Launcher void slotShadowDistLimitToggled(bool checked); private: - Files::ConfigurationManager &mCfgMgr; Settings::Manager &mEngineSettings; QVector mResolutionsPerScreen; diff --git a/apps/launcher/maindialog.cpp b/apps/launcher/maindialog.cpp index df2ba6891..215258bcd 100644 --- a/apps/launcher/maindialog.cpp +++ b/apps/launcher/maindialog.cpp @@ -126,9 +126,9 @@ void Launcher::MainDialog::createPages() mPlayPage = new PlayPage(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); - 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 mPlayPage->setProfilesModel(mDataFilesPage->profilesModel()); diff --git a/apps/launcher/utils/cellnameloader.cpp b/apps/launcher/utils/cellnameloader.cpp index 6d1ed2f49..e7f6e83e7 100644 --- a/apps/launcher/utils/cellnameloader.cpp +++ b/apps/launcher/utils/cellnameloader.cpp @@ -45,4 +45,5 @@ QString CellNameLoader::getCellName(ESM::ESMReader &esmReader) cell.loadNameAndData(esmReader, isDeleted); return QString::fromStdString(cell.mName); -} \ No newline at end of file +} + diff --git a/components/config/gamesettings.cpp b/components/config/gamesettings.cpp index 85c090a3f..d7fe7da94 100644 --- a/components/config/gamesettings.cpp +++ b/components/config/gamesettings.cpp @@ -14,8 +14,6 @@ Config::GameSettings::GameSettings(Files::ConfigurationManager &cfg) { } -Config::GameSettings::~GameSettings() = default; - void Config::GameSettings::validatePaths() { QStringList paths = mSettings.values(QString("data")); diff --git a/components/config/gamesettings.hpp b/components/config/gamesettings.hpp index ccb1d5fd2..263a151c9 100644 --- a/components/config/gamesettings.hpp +++ b/components/config/gamesettings.hpp @@ -21,7 +21,6 @@ namespace Config { public: GameSettings(Files::ConfigurationManager &cfg); - ~GameSettings(); inline QString value(const QString &key, const QString &defaultValue = QString()) { @@ -54,11 +53,11 @@ namespace Config 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 addDataDir(const QString &dir) { if(!dir.isEmpty()) mDataDirs.append(dir); } - inline QString getDataLocal() {return mDataLocal; } + inline QString getDataLocal() const {return mDataLocal; } bool hasMaster(); diff --git a/components/config/launchersettings.cpp b/components/config/launchersettings.cpp index ff2c38438..025bc4382 100644 --- a/components/config/launchersettings.cpp +++ b/components/config/launchersettings.cpp @@ -12,10 +12,6 @@ const char Config::LauncherSettings::sLauncherConfigFileName[] = "launcher.cfg"; const char Config::LauncherSettings::sContentListsSectionPrefix[] = "Profiles/"; const char Config::LauncherSettings::sContentListSuffix[] = "/content"; -Config::LauncherSettings::LauncherSettings() = default; - -Config::LauncherSettings::~LauncherSettings() = default; - QStringList Config::LauncherSettings::subKeys(const QString &key) { QMultiMap settings = SettingsBase::getSettings(); diff --git a/components/config/launchersettings.hpp b/components/config/launchersettings.hpp index 1483052bb..da492c85c 100644 --- a/components/config/launchersettings.hpp +++ b/components/config/launchersettings.hpp @@ -9,9 +9,6 @@ namespace Config class LauncherSettings : public SettingsBase > { public: - LauncherSettings(); - ~LauncherSettings(); - bool writeFile(QTextStream &stream); /// \return names of all Content Lists in the launcher's .cfg file.