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:
Rohit Nirmal 2013-06-11 23:00:12 -05:00
parent 98e5cb6d7b
commit 2fd4d71774

View file

@ -66,8 +66,8 @@ public:
if (keyRe.indexIn(line) != -1) {
QString key = keyRe.cap(1);
QString value = keyRe.cap(2);
QString key = keyRe.cap(1).trimmed();
QString value = keyRe.cap(2).trimmed();
if (!sectionPrefix.isEmpty())
key.prepend(sectionPrefix);