From 0b07cfa3f02d8d48bbb753539ed54f7bec884ae8 Mon Sep 17 00:00:00 2001 From: Tannin Date: Thu, 19 May 2016 19:10:33 +0200 Subject: cleanup --- src/activatemodsdialog.cpp | 5 -- src/nexusinterface.cpp | 4 -- src/organizerproxy.cpp | 5 -- src/organizerproxy.h | 1 - src/savegame.h | 121 --------------------------------------------- src/settings.cpp | 58 ---------------------- 6 files changed, 194 deletions(-) delete mode 100644 src/savegame.h (limited to 'src') diff --git a/src/activatemodsdialog.cpp b/src/activatemodsdialog.cpp index 5ef0a4e5..c7e3dca2 100644 --- a/src/activatemodsdialog.cpp +++ b/src/activatemodsdialog.cpp @@ -35,13 +35,8 @@ ActivateModsDialog::ActivateModsDialog(SaveGameInfo::MissingAssets const &missin QTableWidget *modsTable = findChild("modsTable"); QHeaderView *headerView = modsTable->horizontalHeader(); -#if QT_VERSION >= QT_VERSION_CHECK(5,0,0) headerView->setSectionResizeMode(0, QHeaderView::Stretch); headerView->setSectionResizeMode(1, QHeaderView::Interactive); -#else - headerView->setResizeMode(0, QHeaderView::Stretch); - headerView->setResizeMode(1, QHeaderView::Interactive); -#endif int row = 0; diff --git a/src/nexusinterface.cpp b/src/nexusinterface.cpp index 4a44c067..f5baa6ab 100644 --- a/src/nexusinterface.cpp +++ b/src/nexusinterface.cpp @@ -339,10 +339,6 @@ int NexusInterface::requestFiles(int modID, QObject *receiver, QVariant userData connect(this, SIGNAL(nxmRequestFailed(int,int,QVariant,int,QString)), receiver, SLOT(nxmRequestFailed(int,int,QVariant,int,QString)), Qt::UniqueConnection); -// QTimer::singleShot(1000, this, SLOT(fakeFiles())); -// static int fID = 42; -// return fID++; - nextRequest(); return requestInfo.m_ID; } diff --git a/src/organizerproxy.cpp b/src/organizerproxy.cpp index fe6809e3..b6dbd242 100644 --- a/src/organizerproxy.cpp +++ b/src/organizerproxy.cpp @@ -152,11 +152,6 @@ QList OrganizerProxy::findFileInfos(const QString return m_Proxied->findFileInfos(path, filter); } -MOBase::IProfile *OrganizerProxy::profile() -{ - return m_Proxied->currentProfile(); -} - MOBase::IDownloadManager *OrganizerProxy::downloadManager() const { return m_Proxied->downloadManager(); diff --git a/src/organizerproxy.h b/src/organizerproxy.h index 77600671..7d925482 100644 --- a/src/organizerproxy.h +++ b/src/organizerproxy.h @@ -34,7 +34,6 @@ public: virtual QStringList findFiles(const QString &path, const std::function &filter) const; virtual QStringList getFileOrigins(const QString &fileName) const; virtual QList findFileInfos(const QString &path, const std::function &filter) const; - virtual MOBase::IProfile *profile(); virtual MOBase::IDownloadManager *downloadManager() const; virtual MOBase::IPluginList *pluginList() const; diff --git a/src/savegame.h b/src/savegame.h deleted file mode 100644 index e7220fcc..00000000 --- a/src/savegame.h +++ /dev/null @@ -1,121 +0,0 @@ -/* -Copyright (C) 2012 Sebastian Herbord. All rights reserved. - -This file is part of Mod Organizer. - -Mod Organizer is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -Mod Organizer is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with Mod Organizer. If not, see . -*/ - -#ifndef SAVEGAME_H -#define SAVEGAME_H - - -#include -#include -#include -#include -#include -#include - -#define WIN32_LEAN_AND_MEAN -#include - -namespace MOBase { class IPluginGame; } - -/** - * @brief represents a single save game - **/ -class SaveGame : public QObject { - -Q_OBJECT - -public: - - /** - * @brief construct a save game and immediately read out information from the file - * - * @param filename absolute path of the save game file - **/ - SaveGame(QObject *parent, const QString &filename, MOBase::IPluginGame const *game); - - virtual ~SaveGame(); - - /** - * @brief read out information from a savegame - * - * @param fileName absolute path of the save game file - **/ - virtual void readFile(const QString) { } - - /** - * @return filename of this savegame - */ - const QString &fileName() const { return m_FileName; } - - /** - * @return a list of additional files that belong to this savegame - */ - virtual QStringList attachedFiles() const; - - /** - * @return a list of all files that belong to this savegame - */ - virtual QStringList saveFiles() const; - - /** - * @return name of the player character - **/ - const QString &pcName() const { return m_PCName; } - - /** - * @return level of the player character - **/ - unsigned short pcLevel() const { return m_PCLevel; } - - /** - * @return location of the player character - **/ - const QString &pcLocation() const { return m_PCLocation; } - - /** - * @return index of the save game - **/ - unsigned long saveNumber() const { return m_SaveNumber; } - - /** - * @return creation time of the save game - **/ - SYSTEMTIME creationTime() const { return m_CreationTime; } - - /** - * @return screenshot in the savegame - **/ - const QImage &screenshot() const { return m_Screenshot; } - -protected: - - QString m_FileName; - QString m_PCName { "N/A" }; - unsigned short m_PCLevel { 0 }; - QString m_PCLocation { "N/A" }; - unsigned long m_SaveNumber { 0 }; - SYSTEMTIME m_CreationTime; - QImage m_Screenshot; - -private: - MOBase::IPluginGame const * const m_Game; -}; - - -#endif // SAVEGAME_H diff --git a/src/settings.cpp b/src/settings.cpp index 41d176ea..a0625c4c 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -666,13 +666,6 @@ Settings::PathsTab::PathsTab(Settings *parent, SettingsDialog &dialog) , m_overwriteDirEdit(m_dialog.findChild("overwriteDirEdit")) { m_baseDirEdit->setText(m_parent->getBaseDirectory()); - /* - m_downloadDirEdit->setText(m_parent->getDownloadDirectory(false)); - m_modDirEdit->setText(m_parent->getModDirectory(false)); - m_cacheDirEdit->setText(m_parent->getCacheDirectory(false)); - m_profilesDirEdit->setText(m_parent->getProfileDirectory(false)); - m_overwriteDirEdit->setText(m_parent->getOverwriteDirectory(false)); - */ QString basePath = parent->getBaseDirectory(); QDir baseDir(basePath); @@ -743,57 +736,6 @@ void Settings::PathsTab::update() m_Settings.remove(settingsKey); } } - - -/* - if (!QDir(m_downloadDirEdit->text()).exists()) { - QDir().mkpath(m_downloadDirEdit->text()); - } - if (QFileInfo(m_downloadDirEdit->text()) - != QFileInfo(qApp->property("dataPath").toString() + "/" - + QString::fromStdWString(AppConfig::downloadPath()))) { - m_Settings.setValue("Settings/download_directory", - QDir::toNativeSeparators(m_downloadDirEdit->text())); - } else { - m_Settings.remove("Settings/download_directory"); - } - - if (!QDir(m_modDirEdit->text()).exists()) { - QDir().mkpath(m_modDirEdit->text()); - } - if (QFileInfo(m_modDirEdit->text()) - != QFileInfo(qApp->property("dataPath").toString() + "/" - + QString::fromStdWString(AppConfig::modsPath()))) { - m_Settings.setValue("Settings/mod_directory", - QDir::toNativeSeparators(m_modDirEdit->text())); - } else { - m_Settings.remove("Settings/mod_directory"); - } - - if (!QDir(m_cacheDirEdit->text()).exists()) { - QDir().mkpath(m_cacheDirEdit->text()); - } - if (QFileInfo(m_cacheDirEdit->text()) - != QFileInfo(qApp->property("dataPath").toString() + "/" - + QString::fromStdWString(AppConfig::cachePath()))) { - m_Settings.setValue("Settings/cache_directory", - QDir::toNativeSeparators(m_cacheDirEdit->text())); - } else { - m_Settings.remove("Settings/cache_directory"); - } - - if (!QDir(m_profilesDirEdit->text()).exists()) { - QDir().mkpath(m_profilesDirEdit->text()); - } - if (QFileInfo(m_profilesDirEdit->text()) - != QFileInfo(qApp->property("dataPath").toString() + "/" - + QString::fromStdWString(AppConfig::profilesPath()))) { - m_Settings.setValue("Settings/profiles_directory", - QDir::toNativeSeparators(m_profilesDirEdit->text())); - } else { - m_Settings.remove("Settings/profiles_directory"); - } - */ } Settings::NexusTab::NexusTab(Settings *parent, SettingsDialog &dialog) -- cgit v1.3.1