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

Ian Wadham iandw.au at gmail.com
Thu Dec 11 08:13:46 UTC 2014


Hi Marko,

On 11/12/2014, at 4:57 AM, Marko Käning wrote:
> Hi Jeremy,
> 
> thanks for pointing the standard paths out to me again last night.
> 
> As discussed on IRC, I saw a lot of wrong config paths on my OSX/CI system:
> ---
> [23:44] <mk_MP_> Standard paths [*...* denote writable entry]:
> [23:44] <mk_MP_>   DesktopLocation: "Desktop" */Users/marko/Desktop*
</big snip>

>   DataLocation: "Application Support" */Users/marko/Library/Application Support/Qt Project/qtdiag*
> /opt/kde/install/darwin/mavericks/clang/kf5-qt5/frameworks/kglobalaccel/inst/share/Qt Project/qtdiag
> /opt/kde/install/darwin/mavericks/clang/kf5-qt5/frameworks/khtml/inst/share/Qt Project/qtdiag
> /opt/kde/install/darwin/mavericks/clang/kf5-qt5/frameworks/kauth/inst/share/Qt Project/qtdiag
> /opt/kde/install/darwin/mavericks/clang/kf5-qt5/frameworks/kwidgetsaddons/inst/share/Qt Project/qtdiag
</snip> etc.

I cannot see why you have so many paths in your $XDG_DATA_DIRS value.
Couldn't you just have two paths, such as:

     DataLocation: "Application Support" */Users/marko/Library/Application Support/
   /opt/kde/install/darwin/mavericks/clang/kf5-qt5/frameworks/inst/share/
?

Isn't this what KF5 apps will be expecting?

Also, I think QSP will append the app name automatically when you ask it for DataLocation:
the organisation name, too, if it has been set in QCoreApplication.

And I think all the same remarks would apply to CacheLocation in QSP.

In Qt 5.4 there are two new QSP locations: AppDataLocation and AppLocalDataLocation.  These
are intended to replace DataLocation, making DataLocation deprecated.  On all platforms, except
Windows, AppLocalDataLocation = AppDataLocation = (old) DataLocation.

Cheers, Ian W.



More information about the kde-mac mailing list