NOISSUE actually make INI file saving work again... oops :P

This commit is contained in:
Petr Mrázek 2015-02-21 08:59:38 +01:00
parent b8a8b09796
commit 93b247592d

View File

@ -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);