- when configuration options are default, they need to be removed from the settings

Sun, 29 Dec 2013 17:03:30 +0200

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Sun, 29 Dec 2013 17:03:30 +0200
changeset 599
b77aecd27fb0
parent 598
c111fa74fd17
child 600
209e3f1f7b2c

- when configuration options are default, they need to be removed from the settings

src/config.cc file | annotate | diff | comparison | revisions
--- a/src/config.cc	Sun Dec 29 17:02:40 2013 +0200
+++ b/src/config.cc	Sun Dec 29 17:03:30 2013 +0200
@@ -82,8 +82,11 @@
 	log ("Saving configuration to %1...\n", settings->fileName());
 
 	for (Config* cfg : g_configs)
-		if (!cfg->isDefault())
+	{	if (!cfg->isDefault())
 			settings->setValue (cfg->getName(), cfg->toVariant());
+		else
+			settings->remove (cfg->getName());
+	}
 
 	settings->sync();
 	settings->deleteLater();

mercurial