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

Bradley Giesbrecht pixilla at macports.org
Thu Jan 1 17:04:07 UTC 2015

On Jan 1, 2015, at 5:41 AM, David Faure <faure at kde.org> wrote:

> On Tuesday 23 December 2014 11:25:16 Marko Käning wrote:
>>> What does `kde4-config --path xdgdata-mime` return?
>> $ kde4-config --path xdgdata-mime
>> /Users/marko/.local/share/mime/:/opt/local/share/mime/
> OK, so this works in kdelibs4 because when compiling kdecore, the install 
> prefix gets compiled into it (config-prefix.h.cmake sets KDEDIR to the install 
> prefix), and then KStandardDirs adds that plus "/share" to the list of XDG 
> data dirs.
> This was a transitional solution, it doesn't conform to the XDG specification, 
> it breaks when installing libs and apps into different prefixes, and it's not 
> practical anyway for the Qt5+KF5 setup where Qt itself (QStandardPaths) is 
> looking into the XDG data dirs, without the information of where KF5 or the 
> apps got installed. (Qt itself could very well be somewhere else than in 
> /opt/local...)
> But if /opt/local is such a common prefix on Mac, maybe we can extend 
> qstandardpaths on mac to know about it...

Adding /opt/local on Mac is a bad idea, other package management systems use other prefixes. The build/run time systems should be able to be told where to find things.

Bradley Giesbrecht (pixilla)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mail.kde.org/pipermail/kde-mac/attachments/20150101/c00a8760/attachment.sig>

More information about the kde-mac mailing list