[Development] QStandardPaths could be helpful for cross platform portability, Qt Everywhere

Thiago Macieira thiago.macieira at intel.com
Wed Feb 25 01:04:27 CET 2015

On Wednesday 25 February 2015 00:44:49 Kevin Kofler wrote:
> Jeremy Whiting wrote:
> > One solution is to use/support XDG_*_DIRS environment variables on all
> > platforms. This has one advantage in that the same tools can be used on
> > all platforms to customize the paths given by the standard. This is ok for
> > developers working on software, but not the best idea for shipping actual
> > software to end users since setting environment variables is not often
> > easy or advisable and has other effects. Note this is the approach of the
> > patch in gerrit, but it's a non-solution because of the above mentioned
> > issues.
> Still, I don't understand the strong resistance to implementing this.
> Supporting XDG_* everywhere helps portability and does not hurt the
> non-freedesktop.org platforms in any way. If the user doesn't use those
> environment variables, then nothing changes at all.

The resistance is understanding why it's needed.

Other platforms haven't needed this, so we have to answer the question of why 
we need to add it. People are asking: shouldn't apps and libs instead adapt to 
the OS in question?

First and foremost, as Jeremy said, QSP is lacking functionality even for the 
standard way of doing things on those OS.

Second, there's also the question of unmodified Unix libraries and shared, 
global resources. Given this latter argument, I think we will have to 
implement the XDG variables.
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

More information about the Development mailing list