diff options
| author | Thomas Tanner <trtanner@btinternet.com> | 2015-12-13 18:30:40 +0000 |
|---|---|---|
| committer | Thomas Tanner <trtanner@btinternet.com> | 2015-12-13 18:30:40 +0000 |
| commit | ba176e5e9b639ac0770192987833a3b40e71409a (patch) | |
| tree | 2c1a82d3fcede23e82bddf5b31768e03982d8950 /src/profile.cpp | |
| parent | c344714661a2404a54428439f0cf7dbb1573d01f (diff) | |
Remove dependency of TransferSave on SaveGameBryo, part of fix for #418
Added a method to Profile class to get location of save games for the profile. I haven't added this to IProfile as am in two minds.
Aside from this have done cleanups of issues suggested by include-what-you-use, and some OCD sorting of #includes
Diffstat (limited to 'src/profile.cpp')
| -rw-r--r-- | src/profile.cpp | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/src/profile.cpp b/src/profile.cpp index 77f6ebd1..b0b8db46 100644 --- a/src/profile.cpp +++ b/src/profile.cpp @@ -19,30 +19,40 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include "profile.h" -#include "windows_error.h" #include "modinfo.h" #include "safewritefile.h" #include <utility.h> -#include <util.h> #include <error_report.h> -#include <appconfig.h> +#include "appconfig.h" #include <iplugingame.h> #include <report.h> #include <bsainvalidation.h> #include <dataarchives.h> -#include <QMessageBox> #include <QApplication> -#include <QSettings> -#include <QTemporaryFile> +#include <QFile> // for QFile +#include <QFlags> // for operator|, QFlags +#include <QIODevice> // for QIODevice, etc +#include <QMessageBox> +#include <QScopedArrayPointer> +#include <QStringList> // for QStringList +#include <QtDebug> // for qDebug, qWarning, etc +#include <QtGlobal> // for qPrintable + +#include <Windows.h> +#include <assert.h> // for assert +#include <limits.h> // for UINT_MAX, INT_MAX, etc +#include <stddef.h> // for size_t +#include <string.h> // for wcslen + +#include <algorithm> // for max, min +#include <exception> // for exception #include <functional> +#include <set> // for set +#include <utility> // for find #include <stdexcept> -#define WIN32_LEAN_AND_MEAN -#include <windows.h> -#include <shlobj.h> - using namespace MOBase; using namespace MOShared; @@ -687,6 +697,12 @@ QString Profile::absolutePath() const return QDir::cleanPath(m_Directory.absolutePath()); } +QString Profile::savePath() const +{ + return QDir::cleanPath(m_Directory.absoluteFilePath("saves")); + +} + void Profile::rename(const QString &newName) { QDir profileDir(qApp->property("dataPath").toString() + "/" + QString::fromStdWString(AppConfig::profilesPath())); |
