[KDE/Mac] Thoughts on standard directories in Qt5 - QStandardPaths

Jeremy Whiting jpwhiting at kde.org
Sat Jan 3 22:57:11 UTC 2015


David,

Your patch is missing QLatin1String() around the "/opt/local/share" c
string :). In trying this I think we have a couple of options as Rene
pointed out.

1. Support reading XDG_CONFIG_DIRS
2. Support some compiled in or runtime programatically added alternative
path(s)

1 would certainly be much faster and would fix the CI systems and building
with kdesrc-build on mac (and a similar approach could be done on windows),
but has the drawback of using environment variables, which would need to
also be set by applications when launching them. This seems like a big
drawback imo.
2 would take a bit of thought but would be more usable (think kde
applications .app bundles that could be opened directly without setting any
environment variables or other tricks) The problem with this approach is
that it doesn't fix the CI system issue of needing to set custom data paths
for unit tests.

Thoughts on these ideas? My plan at the end of december was to submit and
revise Marko's patch which does similar to your patch david except that it
does extract XDG_DATA_DIRS (and doesn't touch XDG_CONFIG_DIRS yet).

BR,
Jeremy


On Sat, Jan 3, 2015 at 7:12 AM, René J.V. <rjvbertin at gmail.com> wrote:

> On Saturday January 03 2015 12:00:50 David Faure wrote:
>
> > It's not Qt that puts stuff into ${prefix}/share and ${prefix}/etc/xdg,
> > it's the apps.
>
> Hmm. So even if changing this kind of setting (adding paths to the front
> of a lookup list) in a new bit of code prepended to the standard
> Q(Core)Application initialisation routine, I'd personally still prefer to
> activate that selectively. Probably through a compile-time flag, to avoid
> having to change client code.
>
> > > That'd work
> > > for the MacPorts install, but I'm not even sure if that'd be desirable
> for
> > > pure Qt5 applications installed through MacPorts ...
> >
> > I don't understand the distinction here.
>
> There may not be a distinction if indeed the things being looked up depend
> on the application (and/or KF5) and not on Qt.
>
> > Ian wrote:
> > > Perhaps there could be some way for an XDG-based program, from KDE or
> > > otherwise, to tell QStandardPaths to setXDGModeEnabled(bool xdgMode).
>
> > Well, my initial suggestion was to add support for XDG_* env vars to
> QSP, we
> > could do that *without* a default value of /opt/local (unlike my current
> > patch), so that nothing happens unless these vars are set. It would do
> exactly
> > that - not affect non-MacPorts apps. This would indeed be "less
> intrusive".
>
> Only if you can set those variables only for the applications that require
> them!
>
> > But you guys said bad things about environment variables so I was trying
> to
> > look for other ideas :-)
>
> Not bad, but rather sad ;)
>
> R.
> _______________________________________________
> kde-mac at kde.org
> List Information: https://mail.kde.org/mailman/listinfo/kde-mac
> KDE/Mac Information: http://community.kde.org/Mac
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-mac/attachments/20150103/732a5c89/attachment.html>


More information about the kde-mac mailing list