mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-22 12:39:42 +00:00
trim whitespace from key and value while reading settings file - stops ugly buildup in settings.cfg, and correctly reads settings from it.
This commit is contained in:
parent
98e5cb6d7b
commit
2fd4d71774
1 changed files with 2 additions and 2 deletions
|
@ -66,8 +66,8 @@ public:
|
||||||
|
|
||||||
if (keyRe.indexIn(line) != -1) {
|
if (keyRe.indexIn(line) != -1) {
|
||||||
|
|
||||||
QString key = keyRe.cap(1);
|
QString key = keyRe.cap(1).trimmed();
|
||||||
QString value = keyRe.cap(2);
|
QString value = keyRe.cap(2).trimmed();
|
||||||
|
|
||||||
if (!sectionPrefix.isEmpty())
|
if (!sectionPrefix.isEmpty())
|
||||||
key.prepend(sectionPrefix);
|
key.prepend(sectionPrefix);
|
||||||
|
|
Loading…
Reference in a new issue