aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/python/pythonutils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/python/pythonutils.cpp')
-rw-r--r--src/plugins/python/pythonutils.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/plugins/python/pythonutils.cpp b/src/plugins/python/pythonutils.cpp
index 2e4cd4ed585..87156e3b9cc 100644
--- a/src/plugins/python/pythonutils.cpp
+++ b/src/plugins/python/pythonutils.cpp
@@ -121,11 +121,9 @@ void openPythonRepl(QObject *parent, const FilePath &file, ReplType type)
return file.absolutePath();
};
- const auto args = QStringList{"-i"} + replImportArgs(file, type);
const FilePath pythonCommand = detectPython(file);
-
Process process;
- process.setCommand({pythonCommand, args});
+ process.setCommand({pythonCommand, {"-i", replImportArgs(file, type)}});
process.setWorkingDirectory(workingDir(file));
process.setTerminalMode(TerminalMode::Detached);
process.start();
@@ -201,7 +199,7 @@ static bool isUsableHelper(QHash<FilePath, bool> *cache, const QString &keyStrin
if (it == cache->end()) {
const Key key = keyFromString(keyString);
Process process;
- process.setCommand({python, QStringList{"-m", commandArg, "-h"}});
+ process.setCommand({python, {"-m", commandArg, "-h"}});
process.runBlocking();
const bool usable = process.result() == ProcessResult::FinishedWithSuccess;
it = cache->insert(python, usable);