forked from qt-creator/qt-creator
All: Replace most SynchronousProcess by QtcProcess
Change-Id: I0bf22fef2cd4a7297ef5a1e9aa9c3e2b9348ba42 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -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"}});
|
||||
|
||||
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user