summaryrefslogtreecommitdiff
path: root/src/profile.cpp
diff options
context:
space:
mode:
authorTanninOne <seppleviathan@gmx.de>2016-02-10 18:37:28 +0100
committerTanninOne <seppleviathan@gmx.de>2016-02-10 18:37:28 +0100
commitba8464f01f5cd5340feea7163b9e51492c16fa8a (patch)
treef900f46ac4f14f8635533279bd434b06e6f3a94e /src/profile.cpp
parent5adb3b377ecd50a75dd034a49582a1da91b67e1c (diff)
parent0e9a86ebfc1a97742d0812a7b6ae8bb7f4662673 (diff)
Merge pull request #456 from ThosRTanner/issue/418
Refactor save game code into plugins
Diffstat (limited to 'src/profile.cpp')
-rw-r--r--src/profile.cpp38
1 files changed, 27 insertions, 11 deletions
diff --git a/src/profile.cpp b/src/profile.cpp
index 77f6ebd1..21fb0b7a 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;
@@ -674,7 +684,7 @@ QString Profile::getDeleterFileName() const
QString Profile::getIniFileName() const
{
- return m_Directory.absoluteFilePath(m_GamePlugin->getIniFiles()[0]);
+ return m_Directory.absoluteFilePath(m_GamePlugin->iniFiles()[0]);
}
QString Profile::getProfileTweaks() const
@@ -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()));