From ba176e5e9b639ac0770192987833a3b40e71409a Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Sun, 13 Dec 2015 18:30:40 +0000 Subject: 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 --- src/profile.cpp | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) (limited to 'src/profile.cpp') 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 . #include "profile.h" -#include "windows_error.h" #include "modinfo.h" #include "safewritefile.h" #include -#include #include -#include +#include "appconfig.h" #include #include #include #include -#include #include -#include -#include +#include // for QFile +#include // for operator|, QFlags +#include // for QIODevice, etc +#include +#include +#include // for QStringList +#include // for qDebug, qWarning, etc +#include // for qPrintable + +#include +#include // for assert +#include // for UINT_MAX, INT_MAX, etc +#include // for size_t +#include // for wcslen + +#include // for max, min +#include // for exception #include +#include // for set +#include // for find #include -#define WIN32_LEAN_AND_MEAN -#include -#include - 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())); -- cgit v1.3.1