[KDE/Mac] [OS X] adding a link module to all KF5 targets

René J.V. Bertin rjvbertin at gmail.com
Wed Oct 14 20:01:55 UTC 2015


FYI: with a bit of help from a friendly Qt developer, I've now been able to come up with a QSP patch that includes the necessary "logic" to flip the switch at link time using either

QT += qsp_xdg
(qmake)

or 

find_package(Qt5QspXDG)
target_link_libraries(... Qt5::QspXDG ...)
(cmake)

and hopefully 

find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Core QspXDG)

in KF5 toplevel CMake files.

Without those qsp_xdg/QspXDG tokens, QSP has stock behaviour (except for FontsLocation, which is wrong in stock Qt):

Standard paths [*...* denote writable entry]:
  DesktopLocation: "Desktop" */Users/bertin/Desktop*
  DocumentsLocation: "Documents" */Users/bertin/Documents*
  FontsLocation: "Fonts" */Users/bertin/Library/Fonts* /Library/Fonts /System/Library/Fonts
  ApplicationsLocation: "Applications" */Applications*
  MusicLocation: "Music" */Users/bertin/Music*
  MoviesLocation: "Movies" */Users/bertin/Movies*
  PicturesLocation: "Pictures" */Users/bertin/Pictures*
  TempLocation: "TemporaryItems" *${TMPDIR}*
  HomeLocation: "Home" */Users/bertin*
  AppLocalDataLocation: "Application Support" */Users/bertin/Library/Application Support/QtProject/qtdiag* /Library/Application Support/QtProject/qtdiag /Volumes/Debian/Users/bertin/work/src/new/Qt/qtdiag/qtdiag.app/
  CacheLocation: "Caches" */Users/bertin/Library/Caches/QtProject/qtdiag* /Library/Caches/QtProject/qtdiag
  GenericDataLocation: "Application Support" */Users/bertin/Library/Application Support* /Library/Application Support
  RuntimeLocation: "Application Support" */Users/bertin/Library/Application Support*
  ConfigLocation: "Preferences" */Users/bertin/Library/Preferences*
  DownloadLocation: "Desktop" */Users/bertin/Downloads*
  GenericCacheLocation: "Caches" */Users/bertin/Library/Caches* /Library/Caches
  GenericConfigLocation: "Preferences" */Users/bertin/Library/Preferences*
  AppDataLocation: "Application Support" */Users/bertin/Library/Application Support/QtProject/qtdiag* /Library/Application Support/QtProject/qtdiag /Volumes/Debian/Users/bertin/work/src/new/Qt/qtdiag/qtdiag.app/
  AppConfigLocation: "Preferences" */Users/bertin/Library/Preferences/QtProject/qtdiag*


 with the token; it returns locations that conform to XDG conventions (enough, hopefully). Find the differences: :)

Standard paths [*...* denote writable entry]:
  DesktopLocation: "Desktop" */Users/bertin/Desktop*
  DocumentsLocation: "Documents" */Users/bertin/Documents*
  FontsLocation: "Fonts" */Users/bertin/Library/Fonts* /Library/Fonts /System/Library/Fonts
  ApplicationsLocation: "Applications" */Applications*
  MusicLocation: "Music" */Users/bertin/Music*
  MoviesLocation: "Movies" */Users/bertin/Movies*
  PicturesLocation: "Pictures" */Users/bertin/Pictures*
  TempLocation: "TemporaryItems" *${TMPDIR}*
  HomeLocation: "Home" */Users/bertin*
  AppLocalDataLocation: "Application Support" */Users/bertin/.local/share/QtProject/qtdiag* /Library/Application Support/QtProject/qtdiag /opt/local/share/QtProject/qtdiag /Volumes/Debian/Users/bertin/work/src/new/Qt/qtdiag/build/
  CacheLocation: "Caches" */Users/bertin/.cache/QtProject/qtdiag* /Users/bertin/.cache /Library/Caches/QtProject/qtdiag
  GenericDataLocation: "Application Support" */Users/bertin/.local/share* /opt/local/share /Library/Application Support
  RuntimeLocation: "Application Support" */Users/bertin/Library/Application Support*
  ConfigLocation: "Preferences" */Users/bertin/.config* /opt/local/etc/xdg
  DownloadLocation: "Desktop" */Users/bertin/Downloads*
  GenericCacheLocation: "Caches" */Users/bertin/.cache* /Users/bertin/.cache /Library/Caches
  GenericConfigLocation: "Preferences" */Users/bertin/.config* /opt/local/etc/xdg
  AppDataLocation: "Application Support" */Users/bertin/.local/share/QtProject/qtdiag* /Library/Application Support/QtProject/qtdiag /opt/local/share/QtProject/qtdiag /Volumes/Debian/Users/bertin/work/src/new/Qt/qtdiag/build/
  AppConfigLocation: "Preferences" */Users/bertin/Library/Preferences/QtProject/qtdiag*

https://github.com/RJVB/macstrop/blob/master/aqua/qt5-kde-devel/files/fix-qstandardpaths3.patch
https://github.com/RJVB/macstrop/blob/master/aqua/qt5-kde-devel/files/fix-qstandardpaths-headerspri.patch
https://github.com/RJVB/macstrop/blob/master/aqua/qt5-kde-devel/files/fix-qsp_fontlocations.patch



More information about the kde-mac mailing list