aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@theqtcompany.com>2016-01-07 17:23:18 +0100
committerUlf Hermann <ulf.hermann@theqtcompany.com>2016-01-11 17:31:53 +0000
commit11bd376d1399faff71ff17af9ee10f61b959901b (patch)
tree599be4931a253f133d3b735277df74e07e4c08f6
parentdd37ea85809db58abd3b45d3f55020b240baca28 (diff)
Make environment for QQmlDebugProcess useful
We don't want to replace the system environment, but rather add to it. Change-Id: I0a498682f8f70dc349c529fa4fc3d76ccb815af8 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
-rw-r--r--tests/auto/qml/debugger/shared/debugutil.cpp6
-rw-r--r--tests/auto/qml/debugger/shared/debugutil_p.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/qml/debugger/shared/debugutil.cpp b/tests/auto/qml/debugger/shared/debugutil.cpp
index 54720fc848..769e110144 100644
--- a/tests/auto/qml/debugger/shared/debugutil.cpp
+++ b/tests/auto/qml/debugger/shared/debugutil.cpp
@@ -176,7 +176,7 @@ void QQmlDebugProcess::start(const QStringList &arguments)
#endif
m_mutex.lock();
m_port = 0;
- m_process.setEnvironment(m_environment);
+ m_process.setEnvironment(QProcess::systemEnvironment() + m_environment);
m_process.start(m_executable, arguments);
if (!m_process.waitForStarted()) {
qWarning() << "QML Debug Client: Could not launch app " << m_executable
@@ -234,9 +234,9 @@ QProcess::ExitStatus QQmlDebugProcess::exitStatus() const
return m_process.exitStatus();
}
-void QQmlDebugProcess::setEnvironment(const QStringList &environment)
+void QQmlDebugProcess::addEnvironment(const QString &environment)
{
- m_environment = environment;
+ m_environment.append(environment);
}
QString QQmlDebugProcess::output() const
diff --git a/tests/auto/qml/debugger/shared/debugutil_p.h b/tests/auto/qml/debugger/shared/debugutil_p.h
index 7ab817a509..d29bef4362 100644
--- a/tests/auto/qml/debugger/shared/debugutil_p.h
+++ b/tests/auto/qml/debugger/shared/debugutil_p.h
@@ -94,7 +94,7 @@ public:
QString state();
- void setEnvironment(const QStringList &environment);
+ void addEnvironment(const QString &environment);
void start(const QStringList &arguments);
bool waitForSessionStart();