Suggestion to ntroduce an application for testing config paths and access to files installed by cmake or created at runtime

David Faure faure at kde.org
Fri Aug 22 07:35:17 UTC 2014


On Friday 22 August 2014 09:21:13 Marko Käning wrote:
>  1) files installed by cmake indeed land where the application expects them
>     at runtime

You can write a script that checks that, using the "qtpaths" executable.

For instance xmlgui says

kxmlguiclient.cpp:199:    const QString file = QStandardPaths::locate(QStandardPaths::GenericConfigLocation, QStringLiteral("ui/ui_standards.rc"));

so the script can check that with

qtpaths --locate-file ConfigLocation ui/ui_standards.rc

which returns this, for me:

/d/kde/inst/kde_frameworks/etc/xdg/ui/ui_standards.rc

(technically it should be GenericConfigLocation but it's the same on Unix and GenericConfigLocation was only added recently to qtpaths).


Another example, knotifications looks up .knotifyrc files using
./src/knotifyconfig.cpp:62:    eventsfile = retrieve_from_cache(QStringLiteral("knotifications5/") + _appname + QStringLiteral(".notifyrc"), QStandardPaths::GenericDataLocation);

and kwallet installs its notifyrc file into

PREFIX/share/knotifications5/kwalletd.notifyrc

so we can find out if this file is going to be found by using

qtpaths --locate-file GenericDataLocation knotifications5/kwalletd.notifyrc

which works on my system too.

But doing this for each and every file is a huge amount of work, I'm stopping here. Feel free to take over, now that you know how.

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



More information about the Kde-frameworks-devel mailing list