<div dir="ltr"><div><div>Hi Akarsh,<br><br></div>There was an issue with QStandardPaths::GenericDataLocation (<a href="https://phabricator.kde.org/D1873">https://phabricator.kde.org/D1873</a>). That is why we decided to add "kstars" to paths. If QStandardPaths::AppDataLocation returns the same path but already with "kstars" on both Windows and Linux than we can change it.<br><br></div>Regards, Artem<br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-08-17 22:25 GMT+02:00 Akarsh Simha <span dir="ltr"><<a href="mailto:akarshsimha@gmail.com" target="_blank">akarshsimha@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi<br>
<br>
In KSPaths, we have the following code (for non-Android case):<br>
<br>
return QStandardPaths::locate(<wbr>location, "kstars" + QDir::separator() +<br>
fileName,options);<br>
<br>
And we use location = QStandardPaths::<wbr>GenericDataLocation almost<br>
everywhere in KStars, which should return something like<br>
~/.local/share/ on Linux, whereby our addition of "kstars" seen above<br>
will result in ~/.local/share/kstars/ and everything is fine.<br>
<br>
My question is, why do we prefer QStandardPaths::<wbr>GenericDataLocation<br>
over QStandardPaths::<wbr>AppDataLocation? The latter gives an app-specific<br>
result, whereby we don't have to prepend "kstars" + QDir::separator()<br>
to the file name. If there is a reason to prefer one over the other,<br>
we should document this in a comment.<br>
<br>
Secondly, I will probably add the following code to KSPaths (both methods)<br>
<br>
...<br>
QString _fileName = fileName;<br>
if( location == QStandardPaths::<wbr>GenericDataLocation || location ==<br>
QStandardPaths::<wbr>GenericConfigLocation ) {<br>
_fileName = "kstars" + QDir::separator() + fileName;<br>
}<br>
...<br>
<br>
would this be okay? It's not wise to add "kstars" + separator to every<br>
kind of path location understood by QStandardPaths.<br>
<br>
To me, personally, it seems much cleaner to use<br>
QStandardPaths::<wbr>AppDataLocation and let Qt do the hard work of<br>
figuring out where to put the data. But if there's a good reason for<br>
one over the other, I'll be happy to change my opinion.<br>
<br>
Regards<br>
<span class="HOEnZb"><font color="#888888">Akarsh<br>
</font></span></blockquote></div><br></div>