Detect executables without +x permission in $PATH to improve error message
Summary:
QStandardPaths::findExecutable will not return to us a non-executable binary.
So implement our own iteration over $PATH to detect such a case.
Note: this doesn't handle the case where PATH isn't set at all (QStandardPaths implements a fallback)
nor do we implement this for Windows (where chmod -x doesn't really exist as is). I think this is fine,
in the worst case the user will get the other error message, program not found.
Test Plan:
'sudo chmod a-x /usr/bin/gwenview' then try opening a picture with gwenview from e.g. dolphin, see the error message
CCBUG: 415567
Reviewers: ahmadsamir
Reviewed By: ahmadsamir
Subscribers: ngraham, meven, kde-frameworks-devel
Tags: Frameworks
Differential Revision: https://phabricator.kde.org/D29170