D23884: Fix KListOpenFilesJob unit test on Unix if lsof is not installed
David Hallas
noreply at phabricator.kde.org
Wed Sep 11 18:57:16 BST 2019
hallas added inline comments.
INLINE COMMENTS
> dhaumann wrote in klistopenfilesjobtest_unix.cpp:34
> Can't you simply use QStandardPaths::findExecutable()?
>
> https://doc.qt.io/qt-5/qstandardpaths.html#findExecutable
Yes, this seems to do exactly what we need :)
> ngraham wrote in klistopenfilesjobtest_unix.cpp:37
> A prior career in build engineering tells me that this will start failing in 10 years when `lsof` removes the `-v` argument and replaces it with `--version`. For robustness' sake, I would additionally check for `--version` (and possibly even `-version` too) if the initial `lsof -v` call fails.
I have changed the code to use QStandardPaths::findExecutable instead
REPOSITORY
R244 KCoreAddons
REVISION DETAIL
https://phabricator.kde.org/D23884
To: hallas, dfaure
Cc: dhaumann, ngraham, kde-frameworks-devel, LeGast00n, GB_2, michaelh, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190911/524433e7/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list