aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Fabio Bas2010-01-03 13:19:08 +0000
committerGravatar Fabio Bas2010-01-03 13:19:08 +0000
commitf1e69fdb9f5a8edd37f0de7b17e0b8d3030a654f (patch)
tree348894a5afb4c3bc77aea430c7dc102de847e2c9 /src
parenttranslation (diff)
downloadKVIrc-f1e69fdb9f5a8edd37f0de7b17e0b8d3030a654f.tar.gz
KVIrc-f1e69fdb9f5a8edd37f0de7b17e0b8d3030a654f.tar.bz2
KVIrc-f1e69fdb9f5a8edd37f0de7b17e0b8d3030a654f.zip
fixed config.write key "" to clear a variable
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@3790 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src')
-rw-r--r--src/modules/config/libkviconfig.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules/config/libkviconfig.cpp b/src/modules/config/libkviconfig.cpp
index 13cd63456..9b2afbcd0 100644
--- a/src/modules/config/libkviconfig.cpp
+++ b/src/modules/config/libkviconfig.cpp
@@ -716,7 +716,10 @@ static bool config_kvs_cmd_write(KviKvsModuleCommandCall * c)
if(cfg)
{
- cfg->writeEntry(szKey,szVal);
+ if(!szVal.isEmpty())
+ cfg->writeEntry(szKey,szVal);
+ else
+ cfg->clearKey(szKey);
} else {
c->warning(__tr2qs("The config file with id '%Q' is not open"),&szId);
}