KConfig and $HOME

Thomas Braxton kde.braxton at gmail.com
Wed Oct 17 13:58:30 BST 2007


On 10/17/07, Oswald Buddenhagen <ossi at kde.org> wrote:
>
> On Wed, Oct 17, 2007 at 04:33:06AM -0500, Thomas Braxton wrote:
> > I also changed readEntry<QString>/readEntry<QStringList> to behave
> > like KDE3 and expand env vars if [$e] was specified.
> >
> why only the QString variants? *all* readEntry variants should
> understand [$e] - and this is also the kde3 behavior (except for the
> *Untranslated variants, but this is most probably not intentional).


why would you want to expand an int or a color? expanding strings and paths
is the only thing that makes sense, but it can be added if really necessary.

there is some confusion with [$e] vs. list handling.
> - kde3 expands before splitting. this may lead to spurious splits.
> - your code expands after splitting. this makes scripting lists
>   impossible. also, shell statements containing the separator char will
>   be torn apart, which is highly unexpected.


actually only readPathList expands second, but this can be changed to match
readEntry<QStringList>, patch attached

i think the proper solution is expanding first and introducing an
> additional escape to separator-quote the expanded string:


not even sure what that's supposed to mean?

$ export VAR="foo;bar"
> $ cat foorc
> # note that this contains additional low-level quoting
> # "foo" "bar"
> ListKey1[$e]=$VAR
> # "foo" "bar"
> ListKey2[$e]=$(echo "foo;bar")
> # "foo;bar"
> ListKey3[$e]=$\\VAR
> # "foo;bar"
> ListKey4[$e]=$\\(echo "foo;bar")
>
> --
> Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
> --
> Chaos, panic, and disorder - my work here is done.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071017/bcfa49a3/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: expand.diff
Type: application/octet-stream
Size: 1996 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071017/bcfa49a3/attachment.obj>


More information about the kde-core-devel mailing list