[KDE/Mac] QStandardPaths possible solution

David Faure faure at kde.org
Fri Jan 9 00:05:40 UTC 2015

On Thursday 08 January 2015 16:48:46 Jeremy Whiting wrote:
> Just asked Thiago on irc and got the answer I should have known.
> QLibraryInfo. So the question is should we use
> QLibraryInfo::location(QLibraryInfo::PrefixPath) +
> QString::fromLatin1("/share") or is
> QLibraryInfo::location(QLibraryInfo::DataPath) enough. A quick test in my
> qt5.4 here shows those are both the same, but maybe that's because I did
> -developer-build when I configured, so I wouldn't need to make install.

By the same, you mean that PrefixPath==DataPath, i.e. neither one has /share?
That's what I said, yes. (can also be seen in the output of `qmake -query`).

Hmm ok so maybe DataPath + /share, with the understanding that "DataPath" is 
what people might change because they want Qt's data elsewhere, and they'll 
get a share subdir in there... A bit confusing that it won't match what xdg 
calls the "data dir", but still better than ignoring --datadir altogether.

David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5

More information about the kde-mac mailing list