All: Replace most SynchronousProcess by QtcProcess

Change-Id: I0bf22fef2cd4a7297ef5a1e9aa9c3e2b9348ba42
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2021-06-22 04:33:47 +02:00
parent 8ac67dd1b7
commit 430e81facd
55 changed files with 157 additions and 158 deletions

View File

@@ -278,7 +278,7 @@ Interpreter::Interpreter(const FilePath &python, const QString &defaultName, boo
: id(QUuid::createUuid().toString())
, command(python)
{
SynchronousProcess pythonProcess;
QtcProcess pythonProcess;
pythonProcess.setProcessChannelMode(QProcess::MergedChannels);
pythonProcess.setTimeoutS(1);
pythonProcess.setCommand({python, {"--version"}});

View File

@@ -84,7 +84,7 @@ static QString pythonName(const FilePath &pythonPath)
return {};
QString name = nameForPython.value(pythonPath);
if (name.isEmpty()) {
SynchronousProcess pythonProcess;
QtcProcess pythonProcess;
pythonProcess.setTimeoutS(2);
pythonProcess.setCommand({pythonPath, {"--version"}});
pythonProcess.runBlocking();
@@ -107,7 +107,7 @@ FilePath getPylsModulePath(CommandLine pylsCommand)
pylsCommand.addArg("-h");
SynchronousProcess pythonProcess;
QtcProcess pythonProcess;
Environment env = pythonProcess.environment();
env.set("PYTHONVERBOSE", "x");
pythonProcess.setEnvironment(env);
@@ -161,7 +161,7 @@ static PythonLanguageServerState checkPythonLanguageServer(const FilePath &pytho
}
}
SynchronousProcess pythonProcess;
QtcProcess pythonProcess;
pythonProcess.setCommand(pythonLShelpCommand);
pythonProcess.runBlocking();
if (pythonProcess.allOutput().contains("Python Language Server"))