diff options
author | Alex Richardson <arichardson.kde@gmail.com> | 2014-07-01 20:33:41 +0200 |
---|---|---|
committer | Alex Richardson <arichardson.kde@gmail.com> | 2014-07-01 20:49:45 +0200 |
commit | ae51450ea64970dcdc544185d68e1e73fb390caa (patch) | |
tree | 8047cfbf70cd0276f2f4fc562589d208cf6a417d /src | |
parent | fde2f3c847d2fb90c3354e045bf7d82b04d6e169 (diff) | |
download | kconfig-ae51450ea64970dcdc544185d68e1e73fb390caa.tar.gz kconfig-ae51450ea64970dcdc544185d68e1e73fb390caa.tar.bz2 |
Fix reading of XDG style semicolon separated lists with escaped ';'
Previously the warning "Invalid escape sequence "\;"." would appear and
"\;" was replaced with just the backslash as is done for all
unrecognized escape sequences. Keep both characters so that
readXdgListEntry() works with values containing semicolons
REVIEW: 119074
Diffstat (limited to 'src')
-rw-r--r-- | src/core/kconfigini.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/kconfigini.cpp b/src/core/kconfigini.cpp index 1a8bb771..856b7b76 100644 --- a/src/core/kconfigini.cpp +++ b/src/core/kconfigini.cpp @@ -792,6 +792,12 @@ void KConfigIniBackend::printableToString(BufferFragment *aString, const QFile & case '\\': *r = '\\'; break; + case ';': + // not really an escape sequence, but allowed in .desktop files, don't strip '\;' from the string + *r = '\\'; + r++; + *r = ';'; + break; case 'x': if (i + 2 < l) { *r = charFromHex(str + i + 1, file, line); |