QbsProjectManager: Do not try to call qbs if there is no executable

Otherwise, we'll get warnings from QProcess.

Change-Id: Ibaa536729fa644583c8ddc7a2931ac0ee11c0c9e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Christian Kandeler
2019-12-17 18:25:21 +01:00
parent fa89a452ae
commit 2225387b40
4 changed files with 15 additions and 3 deletions

View File

@@ -247,7 +247,10 @@ QString QbsProfileManager::runQbsConfig(QbsConfigOp op, const QString &key, cons
args << "--unset" << key;
break;
}
qbsConfig.start(QbsSettings::qbsExecutableFilePath().toString(), args);
const Utils::FilePath qbsExe = QbsSettings::qbsExecutableFilePath();
if (qbsExe.isEmpty() || !qbsExe.exists())
return {};
qbsConfig.start(qbsExe.toString(), args);
if (!qbsConfig.waitForStarted(3000) || !qbsConfig.waitForFinished(5000)) {
Core::MessageManager::write(tr("Failed run qbs config: %1").arg(qbsConfig.errorString()));
} else if (qbsConfig.exitCode() != 0) {