Environment: New method to find an executable

Add a method to find an executable:
 * Expand environment variables
 * If relative: Check provided directories
 * If still not found: Check the path

Reviewed-by: dt
This commit is contained in:
Tobias Hunger
2010-09-23 13:08:03 +02:00
parent 94c4ee86c2
commit e851684e9d
2 changed files with 38 additions and 16 deletions

View File

@@ -90,13 +90,15 @@ public:
Environment::const_iterator constBegin() const;
Environment::const_iterator constEnd() const;
QString searchInPath(QString executable) const;
QString searchInPath(const QString &executable,
const QStringList & additionalDirs = QStringList()) const;
QStringList path() const;
static QStringList parseCombinedArgString(const QString &program);
static QString joinArgumentList(const QStringList &arguments);
QString expandVariables(const QString &) const;
QStringList expandVariables(const QStringList &) const;
bool operator!=(const Environment &other) const;
bool operator==(const Environment &other) const;