From 2fd4d71774e25703c6c4e3c4b7b952297ba3e390 Mon Sep 17 00:00:00 2001 From: Rohit Nirmal Date: Tue, 11 Jun 2013 23:00:12 -0500 Subject: [PATCH] trim whitespace from key and value while reading settings file - stops ugly buildup in settings.cfg, and correctly reads settings from it. --- apps/launcher/settings/settingsbase.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/launcher/settings/settingsbase.hpp b/apps/launcher/settings/settingsbase.hpp index 21029b3ad..8320d56a1 100644 --- a/apps/launcher/settings/settingsbase.hpp +++ b/apps/launcher/settings/settingsbase.hpp @@ -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);