[KDE/Mac] QStandardPaths possible solution

Ian Wadham iandw.au at gmail.com
Thu Jan 8 05:46:35 UTC 2015


Hello Christoph,

And welcome to our list… :-)

On 08/01/2015, at 7:24 AM, Christoph Cullmann wrote:
>> On 07 Jan 2015, at 21:12 , Christoph Cullmann <cullmann at absint.com> wrote:
>> 
>>> Hmm, why is /opt/local/share hardcoded but not /usr/local/share? I think
>>> the last one
>>> is often used, too, e.g. by Homebrew.
>> 
>> I guess it wouldn’t do any harm to include that path as well. :)
>> 
>> However, on MacPorts the qt5-mac port maintainer would surely want to replace
>> "/opt/local”
>> with the actually set contents of $prefix (which normally IS set of course to
>> "/opt/local”,
>> but may IT MAY in principle differ)! This happens when a user installs
>> her/his MacPorts tree
>> under a non-standard prefix.
> Hmm, perhaps than zero hard coded paths should be there and only the $ENV-Var should be used?
> 
> As you need to document this for Qt, too, that would be anyway easier.

We already had a long discussion about QStandardPaths, including /usr/local/share
and environment variables, and we have resolved to avoid both, except where env vars
are used in testing and you run apps from the command-line.  It is MacPorts' standard
policy never to install anything in /usr or /usr/local, see:
    https://trac.macports.org/wiki/FAQ#defaultprefix

The full discussion about QStandardPaths started here:
    http://mail.kde.org/pipermail/kde-mac/2014-December/002598.html

All the best, Ian W.
KDE Developer working on a MacBook


More information about the kde-mac mailing list