summaryrefslogtreecommitdiffstats
path: root/logic
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-02-21 08:59:38 +0100
committerPetr Mrázek <peterix@gmail.com>2015-02-21 08:59:38 +0100
commit93b247592db86053ad88997c94fdcbb6f7dc5ebd (patch)
tree9dbb961446b4981d73cab0823dfd287abbe1e635 /logic
parentb8a8b097968a2cac9a571689c836ffd378d57748 (diff)
downloadMultiMC-93b247592db86053ad88997c94fdcbb6f7dc5ebd.tar
MultiMC-93b247592db86053ad88997c94fdcbb6f7dc5ebd.tar.gz
MultiMC-93b247592db86053ad88997c94fdcbb6f7dc5ebd.tar.lz
MultiMC-93b247592db86053ad88997c94fdcbb6f7dc5ebd.tar.xz
MultiMC-93b247592db86053ad88997c94fdcbb6f7dc5ebd.zip
NOISSUE actually make INI file saving work again... oops :P
Diffstat (limited to 'logic')
-rw-r--r--logic/settings/INIFile.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/logic/settings/INIFile.cpp b/logic/settings/INIFile.cpp
index 901dd1ba..cc35aa83 100644
--- a/logic/settings/INIFile.cpp
+++ b/logic/settings/INIFile.cpp
@@ -81,14 +81,15 @@ bool INIFile::saveFile(QString fileName)
return false;
}
QByteArray outArray;
- QTextStream out(&outArray);
- out.setCodec("UTF-8");
for (Iterator iter = begin(); iter != end(); iter++)
{
QString value = iter.value().toString();
value = escape(value);
- out << iter.key() << "=" << value << "\n";
+ outArray.append(iter.key().toUtf8());
+ outArray.append('=');
+ outArray.append(iter.value().toString().toUtf8());
+ outArray.append('\n');
}
if(file.write(outArray) != outArray.size())
{
@@ -105,6 +106,7 @@ bool INIFile::saveFile(QString fileName)
return true;
}
+
bool INIFile::loadFile(QString fileName)
{
QFile file(fileName);