<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/127462/">https://git.reviewboard.kde.org/r/127462/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On März 24th, 2016, 9:15 vorm. UTC, <b>Jarosław Staniek</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">My thoughts mostly related to non-Plasma, non-XDG run environments.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">KF5 is a great addition, in hierarchy often sitting aside of Qt, not a part of XDG-compliant desktop. As such we can't say too much about the underlying OS. It may be XDG-compliant but athis can be a decission at various levels: by application developer or on deployment. Things can of course also change after the binary is compiled.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">It's hard to see any benefit that apps 'pretend' being XDG-compliant by setting vartiables this way on, say, MS Windows or Mac. Qt applications on these systems do not traditionally alter the OS' paradigm, they are.. just apps, as native as possible/reasonable. Example: there are portable apps (on an USB stick) - I believe we can benefit if we help making them. These apps choose not to integrate too much with what's found on the system, often the user account is shared or temporary.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Setting the variable makes KConfig closer to specific groups of desktop, which is a a small step back. People may be interested in KConfig lib as a general purpose utility in their apps.
I'd compare setting the variable this way to setting Windows' USERPROFILE variable on Linux systems, just because it's standard under the former and under Wine. it does not hurt but leaves bad taste.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">So the behaviour at least shall be ifdef'd and the ifdef shall depend on OS for which we're building. But if the same binary should behave well in various environments, I am unsure about hardcoding the behaviour. Also I am not sure if this behaviour should be ON by default. I'd rather have it OFF if it's present at all.</p></pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Well I see it the other way around. Without support of XDG variables replacement, we need to use env varaible that are available on all systems f.ex. $HOME, so the only way to set the datalocaltion to write it hardcoded in the config to $HOME/.local/share. This is really ony true for linux for others OSes you want to have other diretories. So now we are able to use XDG_DATA_HOME to be used in kconfig and it will be replaced for linux to $HOME/.local/share, for windows to C:/Users/<USER>/AppData/Local and so on.
We use QStandardsPaths for replacing so if the replacement is not correct for an OS this is a bug on Qt side, that should be fixed :D</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">And I can't see how this support can harm anyone - if the env is set this is prefered and only if it is not set it is replaced. No dependecy is added and applications are free to not use it at all. If you use XDG_*_HOME without this patch you will return an empty string for it:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">i[$e] = $XDG_DATA_HOME/bla</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">-> will return /bla</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">with the patch you will get:
$HOME/.local/share/bla ( for linux)
C:/Users/<USER>/AppData/Local/bla ( for windows)
[...]</p></pre>
<br />
<p>- Sandro</p>
<br />
<p>On März 22nd, 2016, 3:23 nachm. UTC, Sandro Knauß wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<div>Review request for KDE Frameworks and Matthew Dawson.</div>
<div>By Sandro Knauß.</div>
<p style="color: grey;"><i>Updated März 22, 2016, 3:23 nachm.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kconfig
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">According to freedesktop specification XDG_*_HOME env varaible should be
replaced, if they are not setted with default values.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">as qgetenv only calls getenv, so no path is traslated to it default values. So we have to add this replacement manually. This would help to use XDG_*_HOME more often in configfiles.</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Adding tests for XDG_*_HOME variables.</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>autotests/kconfigtest.cpp <span style="color: grey">(e92197f3be57ead47b70ca5d040474e7a554c416)</span></li>
<li>src/core/kconfig.cpp <span style="color: grey">(07fa6f552c61c52cc1dd64a1c5fb0e2f00873d50)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/127462/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>