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

René J.V. Bertin rjvbertin at gmail.com
Sat Jan 3 14:12:36 UTC 2015


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.


More information about the kde-mac mailing list