diff options
author | kh1 <karsten.heimrich@nokia.com> | 2012-03-15 14:53:47 +0100 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@nokia.com> | 2012-03-19 16:14:04 +0100 |
commit | be3b47d0d504a3409ce66bd77bb8c0acff87c4f5 (patch) | |
tree | 09dfb02d484a4f395991972b828da71400fb761a /src/libs/kdtools/environment.h | |
parent | 9fd62353cf7f973d78cd2093328ac15b5c4980b6 (diff) |
Reorganize the tree, have better ifw.pri. Shadow build support.
Change-Id: I01fb12537f863ed0744979973c7e4153889cc5cb
Reviewed-by: Tim Jenssen <tim.jenssen@nokia.com>
Diffstat (limited to 'src/libs/kdtools/environment.h')
-rw-r--r-- | src/libs/kdtools/environment.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/libs/kdtools/environment.h b/src/libs/kdtools/environment.h new file mode 100644 index 000000000..917da4f45 --- /dev/null +++ b/src/libs/kdtools/environment.h @@ -0,0 +1,39 @@ +#ifndef LIBINSTALLER_ENVIRONMENT_H +#define LIBINSTALLER_ENVIRONMENT_H + +#include "kdtoolsglobal.h" + +#include <QString> +#include <QHash> + +QT_BEGIN_NAMESPACE +class QProcess; +class QProcessEnvironment; +QT_END_NAMESPACE + +namespace KDUpdater { + +class KDTOOLS_EXPORT Environment +{ +public: + static Environment &instance(); + + ~Environment() {} + + QString value(const QString &key, const QString &defaultValue = QString()) const; + void setTemporaryValue(const QString &key, const QString &value); + + QProcessEnvironment applyTo(const QProcessEnvironment &qpe) const; + void applyTo(QProcess *process); + +private: + Environment() {} + +private: + Q_DISABLE_COPY(Environment) + QHash<QString, QString> m_tempValues; +}; + +} // namespace KDUpdater + +#endif |