summaryrefslogtreecommitdiff
path: root/src/profile.cpp
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2014-09-29 20:35:35 +0200
committerTannin <devnull@localhost>2014-09-29 20:35:35 +0200
commitdb0e278817cf5a36e15f1945c52e73726598e8d9 (patch)
treed11067e844c680a3f1c907cfd624a39dd731e290 /src/profile.cpp
parent2ce135e0bf7ce2c801b1a8d57fe10b099b9007aa (diff)
- moved the hook-recursion-protection to tls
- some code cleanup and consolidation - hook.dll will now report all of its own exceptions - some more logging during startup - changed the way urls are encoded for download requests - now displaying (one of the) process name(s) while waiting for a program to end - bugfix: spawned processes were forced to leave the job
Diffstat (limited to 'src/profile.cpp')
-rw-r--r--src/profile.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/profile.cpp b/src/profile.cpp
index 958084d7..6e9d8f0f 100644
--- a/src/profile.cpp
+++ b/src/profile.cpp
@@ -217,7 +217,7 @@ void Profile::createTweakedIniFile()
}
if (localSavesEnabled()) {
- if (!::WritePrivateProfileStringW(L"General", L"bUseMyGamesDirectory", L"1", ToWString(tweakedIni).c_str())) {
+ if (!::WritePrivateProfileStringW(L"General", L"bUseMyGamesDirectory", L"0", ToWString(tweakedIni).c_str())) {
error = true;
}
@@ -238,7 +238,7 @@ void Profile::createTweakedIniFile()
void Profile::refreshModStatus()
{
QFile file(getModlistFileName());
- if (!file.exists()) {
+ if (!file.open(QIODevice::ReadOnly)) {
throw MyException(tr("\"%1\" is missing or inaccessible").arg(getModlistFileName()));
}
@@ -249,10 +249,9 @@ void Profile::refreshModStatus()
std::set<QString> namesRead;
// load mods from file and update enabled state and priority for them
- file.open(QIODevice::ReadOnly);
int index = 0;
while (!file.atEnd()) {
- QByteArray line = file.readLine();
+ QByteArray line = file.readLine().trimmed();
bool enabled = true;
QString modName;
if (line.length() == 0) {