Fix searchInPath in various ways

Search in path order not in extension order. That is prefer exec.bat to
exec.exe if exec.bat is earlier in the path.

On Windows only append extensions if the executable has none. (That's
how the shell works.)

Change-Id: I4774f47e5d8e71efccbce49f3facc360eb2a193e
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
Daniel Teske
2012-09-11 13:56:08 +02:00
parent c68c96fd23
commit d02d67d58c
2 changed files with 44 additions and 44 deletions

View File

@@ -108,8 +108,7 @@ public:
bool operator==(const Environment &other) const;
private:
QString searchInPath(const QStringList &executables,
const QStringList &additionalDirs = QStringList()) const;
QString searchInDirectory(const QStringList &execs, QString directory) const;
QMap<QString, QString> m_values;
};