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

@@ -219,7 +219,12 @@ void QbsSession::initialize()
});
connect(d->packetReader, &PacketReader::packetReceived, this, &QbsSession::handlePacket);
d->state = State::Initializing;
d->qbsProcess->start(QbsSettings::qbsExecutableFilePath().toString(), {"session"});
const FilePath qbsExe = QbsSettings::qbsExecutableFilePath();
if (qbsExe.isEmpty() || !qbsExe.exists()) {
QTimer::singleShot(0, this, [this] { setError(Error::QbsFailedToStart); });
return;
}
d->qbsProcess->start(qbsExe.toString(), {"session"});
}
void QbsSession::sendQuitPacket()