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).