Diffusion KIO 5a4275fd394c

kioslave: preserve argv[0], to fix applicationDirPath() on non-Linux

Authored by dfaure on May 18 2019, 9:37 PM.

Description

kioslave: preserve argv[0], to fix applicationDirPath() on non-Linux

Summary:
Linux has /proc so it doesn't matter there, but e.g. on FreeBSD
lying about argc[0] leads to applicationDirPath() being wrong,
which leads to the kioslave executable not being found in CI
(because it's looking in applicationDirPath(), which for a kioslave
was build/bin/kf5/kio, where e.g. trash.so can be found)

Test Plan:
commenting out the Q_OS_LINUX block in qcoreapplication.cpp,
uninstalling kio, then running bin/dropjobtest shouldDropFromTrash.
Failed with "kioslave not found", works after this fix.

Reviewers: sitter, davidedmundson, apol, adridg

Reviewed By: apol

Subscribers: anthonyfieroni, kde-frameworks-devel

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D21280