RFC: escape strings in KConfigBase

Aaron J. Seigo aseigo at kde.org
Wed May 16 17:36:20 BST 2007

On Tuesday 15 May 2007, Thiago Macieira wrote:
> Andreas Hartmetz wrote:
> >Backwards compatibility must be broken if you want to improve things,
> > big deal. There is a system in place to deal with updating config
> > files, and it is explicitly stated that an updated config file will not
> > be readable by an older version of an application.
> >So minor versions may break config files, and you are arguing that major
> >versions may not. Compatibility just does not seem to be that big an
> > issue. Backslash escaping is also very unobtrusive if you don't make
> > use it.
> That doesn't apply to kdeglobals backwards compatibility. You're not
> allowed to downgrade an application or library, but since KDE 3 and 4
> must coexist, we must allow for KDE 3 libraries to read KDE 4's
> kdeglobals.

this doesn't seem like a cogent reason to avoid escaping in values, imho. if a 
character needs to be escaped, it wouldn't work in kde3 properly anyways; 
additionally, i don't see any characters needing escaping going into 

it seems far easier to simply be careful about what values we store in 
kdeglobals that is shared by kde3/kde4 apps (style name, keyboard shortcuts, 
etc) and make kconfigini escape values properly before writing to disk and 
unescape when reading.

yes, there's overhead there, but i doubt it's in any way really impactful for 
the user in a negative fashion.

Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

Full time KDE developer sponsored by Trolltech (http://www.trolltech.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070516/b4b75aaf/attachment.sig>

More information about the kde-core-devel mailing list