KService autotests and tests on OS X
René J.V. Bertin
rjvbertin at gmail.com
Wed Nov 11 14:42:37 UTC 2015
On Wednesday November 11 2015 14:47:03 David Faure wrote:
> > 2) I discovered, some time after having attempted to run these, that a large number of the app bundles under /Applications HAD GONE MISSING.
>
> Oops!?!
That's a diluted version of my own reaction, yesterday at about 23h ...
> kmimeassociationstest does
> QStandardPaths::enableTestMode(true);
> then calls QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation)
> and deletes all of it.
Yeah, I found that after searching ApplicationsLocation ... *after* restoring my /Applications directory.
> On a Linux system that's ~/.qttest/share/applications
> What does this return on OSX?
I had to patch qtpaths to test this easily without digging through source code: it indeed returns just /Applications .
I'll be reporting this to Qt, of course.
And of course I'll be re-checking my QSP patch, because it should probably make QSP::ApplicationsLocation return share/applications like on Linux, or at least whatever Qt is configured to use for the app bundles it installs.
Related question: is there interplay between QSP::ApplicationsLocation and the CMake BUNDLE_INSTALL_DIR variable? Following MacPorts convention I'm installing pure Qt5 app bundles into /Applications/MacPorts/Qt5, KDE4 app bundles go into /Applications/MacPorts/KDE4 and KF5 one go into /Applications/MacPorts/KF5 .
Or maybe I should ask what QSP::ApplicationsLocation is used for. I guess KService uses it to search for .desktop and/or .service files or their equivalent. Nothing like that has yet been installed into /Applications, but my service files appear to end up in /opt/local/share/kservices5, does that sound about right?
> It does the same with GenericConfigLocation and CacheLocation, btw.
As far as I can see those follow XDG specs with my QSP patch, and respect testMode even with the native QSP.
> AFAICS QSP also uses ~/.qttest on OSX, that's where this should all have happened,
> not in a global dir.
Clearly not for all locations, I'll have to check which other ones are affected.
> ksycocatest.cpp also does some recursive deletion of dirs, but they are more
> specific, like QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/kservices5",
> so that can't be it.
No, that one's well-behaved too.
R.
More information about the Kde-frameworks-devel
mailing list