Special characters in KConfig (& kglobalaccel)
Lubos Lunak
l.lunak at suse.cz
Wed Feb 6 15:11:33 GMT 2008
On Wednesday 06 of February 2008, David Faure wrote:
> On Wednesday 06 February 2008, Lubos Lunak wrote:
> > 1) as separator in KGlobalAccel items, used as keys for KConfig.
>
> Indeed this makes it hard on kconf_update scripts.
> This is something that we could change at the same time we are changing
> kglobalaccel to use action names instead of translated names.
> Then we could use ':' as separator or something... like this
> kwin:next_virtual_desktop=F13
> We don't use ':' in kcomponentdata names AFAIK; and it's easy to
> Q_ASSERT(!componentName.contains(':')); in the kglobalaccel code to
> make sure we tell the app author soon enough about the issue :)
If kglobalshortcutsrc ends up containing more than just name=shortcut, then a
better way should be nested groups. Which is how I found the other problem
and wanted to see a solution for it before I actually did something with
KGlobalAccel.
If it turns out just one entry per action is enough, then ':' is ok, I agree.
However \x01 seems to be also used for separating shortcuts (!?!), those
should go with ':' I think.
The actual change will either mean all manual changes will be lost, or a
kconf_update script will require a real binary using KConfig that will do the
conversion.
Which, for the record, will additionally mean requiring dependencies for
kconf_update, since a user updating only somewhen later will want this script
run first before any other that affects shortcuts, not the other way around.
--
Lubos Lunak
KDE developer
--------------------------------------------------------------
SUSE LINUX, s.r.o. e-mail: l.lunak at suse.cz , l.lunak at kde.org
Lihovarska 1060/12 tel: +420 284 028 972
190 00 Prague 9 fax: +420 284 028 951
Czech Republic http//www.suse.cz
More information about the kde-core-devel
mailing list