Utils: Remove one spurious static function from QtcProcess

The next one could probably be merged into FilePath::searchInPath

Change-Id: If32fe77fb19b628a44d212bb8420443bd4f04899
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
hjk
2022-06-16 16:50:14 +02:00
parent 3156c33d12
commit f7e9623369
3 changed files with 7 additions and 10 deletions

View File

@@ -170,8 +170,11 @@ bool ExternalQtEditor::getEditorLaunchData(const Utils::FilePath &filePath,
qtVersionsToCheck = Utils::filteredUnique(qtVersionsToCheck); // can still contain nullptr
data->binary = findFirstCommand(qtVersionsToCheck, m_commandForQtVersion);
// fallback
if (data->binary.isEmpty())
data->binary = Utils::QtcProcess::locateBinary(m_commandForQtVersion(nullptr));
if (data->binary.isEmpty()) {
const QString path = qEnvironmentVariable("PATH");
data->binary = Utils::QtcProcess::locateBinary(path, m_commandForQtVersion(nullptr));
}
if (data->binary.isEmpty()) {
*errorMessage = msgAppNotFound(id().toString());
return false;