<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 March 24th, 2016, 9:15 a.m. 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>
<p>On March 24th, 2016, 1:12 p.m. UTC, <b>Sandro Knauß</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;">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>
</blockquote>
<p>On March 25th, 2016, 11:01 a.m. 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;">Before we discuss anything, let's narrow to non-Unix OSes (considering Mac OS X as non-Unix):
- Does these OSes use XDG_xxxx to locate anything? I can't spot.
- Isn't it misleading to use the XDG_xxxx variables to pass the locations on these OSes? Don't we have a choice?</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Digression: I am asking because one quality attribute of KF5 for could be to behave or "think" like Qt would, without spreading a "Unix-y" / "XDG" feel when not really necessary. Non-Unix OSes have own equivalents for many things (e.g. xdg-open), at times these equivalents can be found inferior but we, not being authors of the OSes, can just say "let them be such". We have enough of layers and emulators, subsystems e.g. on Windows (see .NET or chrome-based hybrid apps). Frameworks for developing native apps on these OSes shall not attempt to fix these system facilities but just integrate. Users wanting XDG experience have choice to use XDG-compliant systems...</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Summing up, an #ifdef and update of documentation would be nice. My 2c...</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;">Indeed a better name for these fake env vars could be QT_DATA_HOME, QT_CONFIG_HOME and QT_CACHE_HOME. In fact I'm thinking more and more that QStandardPaths should support these as real env vars on all OSes --- but that's a separate discussion. For the purposes of this patch, we're faking env vars when they are not set, for the convenience of the config files / desktop files syntax. So these names would work just fine, and would simply be the interface for config files to the QStandardPaths API.</p></pre>
<br />
<p>- David</p>
<br />
<p>On March 22nd, 2016, 3:23 p.m. 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 March 22, 2016, 3:23 p.m.</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>