<br><br><div><span class="gmail_quote">On 10/17/07, <b class="gmail_sendername">Oswald Buddenhagen</b> <<a href="mailto:ossi@kde.org">ossi@kde.org</a>> wrote:</span><blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">
On Wed, Oct 17, 2007 at 04:33:06AM -0500, Thomas Braxton wrote:<br>> I also changed readEntry<QString>/readEntry<QStringList> to behave<br>> like KDE3 and expand env vars if [$e] was specified.<br>><br>
why only the QString variants? *all* readEntry variants should<br>understand [$e] - and this is also the kde3 behavior (except for the<br>*Untranslated variants, but this is most probably not intentional).</blockquote><div>
<br class="webkit-block-placeholder"></div><div>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.</div><br><blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">
there is some confusion with [$e] vs. list handling.<br>- kde3 expands before splitting. this may lead to spurious splits.<br>- your code expands after splitting. this makes scripting lists<br>  impossible. also, shell statements containing the separator char will
<br>  be torn apart, which is highly unexpected.</blockquote><div><br class="webkit-block-placeholder"></div><div>actually only readPathList expands second, but this can be changed to match readEntry<QStringList>, patch attached
</div><br><blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">i think the proper solution is expanding first and introducing an<br>additional escape to separator-quote the expanded string:
</blockquote><div><br class="webkit-block-placeholder"></div><div>not even sure what that's supposed to mean? </div><br><blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">
$ export VAR="foo;bar"<br>$ cat foorc<br># note that this contains additional low-level quoting<br># "foo" "bar"<br>ListKey1[$e]=$VAR<br># "foo" "bar"<br>ListKey2[$e]=$(echo "foo;bar")
<br># "foo;bar"<br>ListKey3[$e]=$\\VAR<br># "foo;bar"<br>ListKey4[$e]=$\\(echo "foo;bar")<br><br>--<br>Hi! I'm a .signature virus! Copy me into your ~/.signature, please!<br>--<br>Chaos, panic, and disorder - my work here is done.
<br></blockquote></div><br>