Archives: Make three member functions more similar. Avoid some searches

Authored by asensi on Apr 15 2020, 10:38 PM.

Description

Archives: Make three member functions more similar. Avoid some searches

Make three member functions more similar, in order to port future changes more easily from one function to the other.

Also, in some cases when the path to a program is found: remember the path for the next time, avoiding some future searches.

Remove detectFullPathName code that nowadays can be substituted by QStandardPaths::findExecutable(name).

Test plan: The one described in the task Solve some bugs related to archives, remove some duplicated code.

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