forked from qt-creator/qt-creator
Utils: Untie the Environment class from the host system.
It is used e.g. in the RemoteLinux plugin (via ProjectExplorer::EnvironmentAspect) and should therefore not assume that it's meant for a host system process. Change-Id: I9f44f862f133579b65951e43fc1e654c425fd3d7 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#ifndef UTILS_ENVIRONMENT_H
|
||||
#define UTILS_ENVIRONMENT_H
|
||||
|
||||
#include "hostosinfo.h"
|
||||
#include "utils_global.h"
|
||||
|
||||
#include <QMap>
|
||||
@@ -65,8 +66,8 @@ class QTCREATOR_UTILS_EXPORT Environment
|
||||
public:
|
||||
typedef QMap<QString, QString>::const_iterator const_iterator;
|
||||
|
||||
Environment() {}
|
||||
explicit Environment(const QStringList &env);
|
||||
explicit Environment(OsType osType = HostOsInfo::hostOs()) : m_osType(osType) {}
|
||||
explicit Environment(const QStringList &env, OsType osType = HostOsInfo::hostOs());
|
||||
static Environment systemEnvironment();
|
||||
|
||||
QStringList toStringList() const;
|
||||
@@ -112,6 +113,7 @@ public:
|
||||
private:
|
||||
QString searchInDirectory(const QStringList &execs, QString directory) const;
|
||||
QMap<QString, QString> m_values;
|
||||
OsType m_osType;
|
||||
};
|
||||
|
||||
} // namespace Utils
|
||||
|
||||
Reference in New Issue
Block a user