summaryrefslogtreecommitdiff
path: root/src/libs/utils/consoleprocess_unix.cpp
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@qt.io>2018-09-06 06:58:50 +0200
committerChristian Stenger <christian.stenger@qt.io>2018-09-06 09:12:52 +0000
commit8c6975b0fcc27ff332750c56394bca7571c3c35e (patch)
tree30623a188cb5f4b926429db1a42950bb580e3eeb /src/libs/utils/consoleprocess_unix.cpp
parent019092d7f6aed048302a99a72d5c00bb1f127a1d (diff)
downloadqt-creator-8c6975b0fcc27ff332750c56394bca7571c3c35e.tar.gz
Utils: Fix compile for UNIX when using Qt5.9
QProcess::startDetached(qint64 *) has been introduced in Qt5.10. When using Qt5.9 just use the old way where it was not possible to set the environment for the process. Additionally disable the respective UI part to avoid complaining users. Amends 626665b7a4d5 and 72ada44be335. Change-Id: I34233402fe385035566484431838dd6edbda483e Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/libs/utils/consoleprocess_unix.cpp')
-rw-r--r--src/libs/utils/consoleprocess_unix.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libs/utils/consoleprocess_unix.cpp b/src/libs/utils/consoleprocess_unix.cpp
index ffaf34d5e8..fdda375534 100644
--- a/src/libs/utils/consoleprocess_unix.cpp
+++ b/src/libs/utils/consoleprocess_unix.cpp
@@ -436,7 +436,11 @@ bool ConsoleProcess::startTerminalEmulator(QSettings *settings, const QString &w
const Utils::Environment &env)
{
const TerminalCommand term = terminalEmulator(settings);
-
+#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
+ // for 5.9 and below we cannot set the environment
+ return QProcess::startDetached(term.command, QtcProcess::splitArgs(term.openArgs),
+ workingDir);
+#else
QProcess process;
process.setProgram(term.command);
process.setArguments(QtcProcess::splitArgs(term.openArgs));
@@ -444,6 +448,7 @@ bool ConsoleProcess::startTerminalEmulator(QSettings *settings, const QString &w
process.setWorkingDirectory(workingDir);
return process.startDetached();
+#endif
}
} // namespace Utils