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

Ian Wadham iandw.au at gmail.com
Sun Dec 7 05:43:50 UTC 2014


Hi Marko,

On 07/12/2014, at 2:33 AM, Marko Käning wrote:
> BTW, when I use qtpaths I see this for the data location:
> ---
> $ /opt/kde/install/darwin/mavericks/clang/kf5-qt5/qt5/inst/bin/qtpaths --paths GenericDataLocation
> /Users/marko/Application Support:/Library/Application Support

If you are building qstandardpaths_mac.cpp (or .mm) into your Qt 5 installation, QSP should
find exactly these two paths, separated by a colon.  The first is a HOME (or writeable) type.  The
second is a read-only type where Bovo would store all its non-compiled and non-config files,
under sub-directory "bovo".  In Bovo, I think that is just the themes and SVG files.  Other games
might have level-files, sounds, sample puzzles, etc.

> which means that the handling of the GenericDataLocation is obviously not properly implemented,
> as this should contain many more paths, including the one to bovo’s install root.

XDG locations are "prefixes-only", in effect, and so are QSP locations.  Distinction between different
types of files used in KDE has to be handled by the application or library adding strings to the QSP
location.  Or the app can use QSP::locate or QSP::locateAll to find particular file names or directory
names in the tree or trees (which is what Bovo is doing).

I guess the CMakeLists.txt files must somehow construct and install whatever trees lie
below GenericDataLocation or DataLocation (GenericDataLocation value followed by
/<APPNAME>, where <APPNAME> could include some kind of organisation name or
build prefix).

For examples of how KDE 4 apps used to do things vs. how they are done in KF5 see: 
    https://community.kde.org/Frameworks/Porting_Notes/KStandardDirs

Cheers, Ian W.




More information about the kde-mac mailing list