mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-26 22:45:15 -04:00
Merge remote-tracking branch 'pvdk/spacefix'
This commit is contained in:
commit
08e2254628
@ -96,15 +96,15 @@ bool GameSettings::readFile(QTextStream &stream)
|
|||||||
QRegExp keyRe("^([^=]+)\\s*=\\s*(.+)$");
|
QRegExp keyRe("^([^=]+)\\s*=\\s*(.+)$");
|
||||||
|
|
||||||
while (!stream.atEnd()) {
|
while (!stream.atEnd()) {
|
||||||
QString line = stream.readLine().simplified();
|
QString line = stream.readLine();
|
||||||
|
|
||||||
if (line.isEmpty() || line.startsWith("#"))
|
if (line.isEmpty() || line.startsWith("#"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (keyRe.indexIn(line) != -1) {
|
if (keyRe.indexIn(line) != -1) {
|
||||||
|
|
||||||
QString key = keyRe.cap(1).simplified();
|
QString key = keyRe.cap(1);
|
||||||
QString value = keyRe.cap(2).simplified();
|
QString value = keyRe.cap(2);
|
||||||
|
|
||||||
// Don't remove existing data entries
|
// Don't remove existing data entries
|
||||||
if (key != QLatin1String("data"))
|
if (key != QLatin1String("data"))
|
||||||
|
@ -52,7 +52,7 @@ public:
|
|||||||
QRegExp keyRe("^([^=]+)\\s*=\\s*(.+)$");
|
QRegExp keyRe("^([^=]+)\\s*=\\s*(.+)$");
|
||||||
|
|
||||||
while (!stream.atEnd()) {
|
while (!stream.atEnd()) {
|
||||||
QString line = stream.readLine().simplified();
|
QString line = stream.readLine();
|
||||||
|
|
||||||
if (line.isEmpty() || line.startsWith("#"))
|
if (line.isEmpty() || line.startsWith("#"))
|
||||||
continue;
|
continue;
|
||||||
@ -65,8 +65,8 @@ public:
|
|||||||
|
|
||||||
if (keyRe.indexIn(line) != -1) {
|
if (keyRe.indexIn(line) != -1) {
|
||||||
|
|
||||||
QString key = keyRe.cap(1).simplified();
|
QString key = keyRe.cap(1);
|
||||||
QString value = keyRe.cap(2).simplified();
|
QString value = keyRe.cap(2);
|
||||||
|
|
||||||
if (!sectionPrefix.isEmpty())
|
if (!sectionPrefix.isEmpty())
|
||||||
key.prepend(sectionPrefix);
|
key.prepend(sectionPrefix);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user