|
|
|
@ -96,15 +96,15 @@ bool GameSettings::readFile(QTextStream &stream)
|
|
|
|
|
QRegExp keyRe("^([^=]+)\\s*=\\s*(.+)$");
|
|
|
|
|
|
|
|
|
|
while (!stream.atEnd()) {
|
|
|
|
|
QString line = stream.readLine().simplified();
|
|
|
|
|
QString line = stream.readLine();
|
|
|
|
|
|
|
|
|
|
if (line.isEmpty() || line.startsWith("#"))
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
if (keyRe.indexIn(line) != -1) {
|
|
|
|
|
|
|
|
|
|
QString key = keyRe.cap(1).simplified();
|
|
|
|
|
QString value = keyRe.cap(2).simplified();
|
|
|
|
|
QString key = keyRe.cap(1);
|
|
|
|
|
QString value = keyRe.cap(2);
|
|
|
|
|
|
|
|
|
|
// Don't remove existing data entries
|
|
|
|
|
if (key != QLatin1String("data"))
|
|
|
|
|