summaryrefslogtreecommitdiffstats
path: root/logic/settings
diff options
context:
space:
mode:
Diffstat (limited to 'logic/settings')
-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);