forked from qt-creator/qt-creator
Utils: Rename QtcProcess::Result::Finished to FinishedWithSuccess
To make clear that this is not just any finish. Also change FinishedError to FinishedWithError, to create symmetry. Also adapt enum member description to reality. Change-Id: I13e05391eb86fdb24e2ae660f14dfddb282e1104 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -283,7 +283,7 @@ Interpreter::Interpreter(const FilePath &python, const QString &defaultName, boo
|
||||
pythonProcess.setTimeoutS(1);
|
||||
pythonProcess.setCommand({python, {"--version"}});
|
||||
pythonProcess.runBlocking();
|
||||
if (pythonProcess.result() == QtcProcess::Finished)
|
||||
if (pythonProcess.result() == QtcProcess::FinishedWithSuccess)
|
||||
name = pythonProcess.stdOut().trimmed();
|
||||
if (name.isEmpty())
|
||||
name = defaultName;
|
||||
|
||||
@@ -88,7 +88,7 @@ static QString pythonName(const FilePath &pythonPath)
|
||||
pythonProcess.setTimeoutS(2);
|
||||
pythonProcess.setCommand({pythonPath, {"--version"}});
|
||||
pythonProcess.runBlocking();
|
||||
if (pythonProcess.result() != QtcProcess::Finished)
|
||||
if (pythonProcess.result() != QtcProcess::FinishedWithSuccess)
|
||||
return {};
|
||||
name = pythonProcess.allOutput().trimmed();
|
||||
nameForPython[pythonPath] = name;
|
||||
|
||||
Reference in New Issue
Block a user