From 78f628e0af2f2df562c40ac1424b432b6a969055 Mon Sep 17 00:00:00 2001 From: Tannin Date: Fri, 28 Nov 2014 11:06:28 +0100 Subject: cleanup und bugfixes after refactoring --- src/profile.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/profile.cpp') diff --git a/src/profile.cpp b/src/profile.cpp index 6e9d8f0f..37ed94cc 100644 --- a/src/profile.cpp +++ b/src/profile.cpp @@ -59,7 +59,8 @@ Profile::Profile(const QString &name, bool useDefaultSettings) : m_SaveTimer(NULL) { initTimer(); - QString profilesDir = QDir::fromNativeSeparators(ToQString(GameInfo::instance().getProfilesDir())); + QString profilesDir = qApp->property("datapath").toString() + "/" + ToQString(AppConfig::profilesPath()); +qDebug("pd %s", qPrintable(profilesDir)); QDir profileBase(profilesDir); QString fixedName = name; @@ -78,6 +79,7 @@ Profile::Profile(const QString &name, bool useDefaultSettings) touchFile("modlist.txt"); touchFile("archives.txt"); +qDebug("fp %s", qPrintable(fullPath)); GameInfo::instance().createProfile(ToWString(fullPath), useDefaultSettings); } catch (...) { // clean up in case of an error @@ -88,8 +90,8 @@ Profile::Profile(const QString &name, bool useDefaultSettings) } -Profile::Profile(const QDir& directory) - : m_Directory(directory), m_SaveTimer(NULL) +Profile::Profile(const QDir &directory) + : m_Directory(directory), m_SaveTimer(nullptr) { initTimer(); if (!QFile::exists(m_Directory.filePath("modlist.txt"))) { -- cgit v1.3.1