forked from qt-creator/qt-creator
QbsProjectManager: Fix install step
We got the install command name wrong, which caused the installation to fail. In addition, we forgot to add handling for the "protocol-error" message from qbs, so the step was hanging, rather than aborting. Finally, we triggered a number of assertions in BuildStep::buildConfiguration(). This went all unnoticed for a while, because the install step is not enabled by default these days. Change-Id: I906e7e472563d4ad8fc7557bd706a7cb67f9f2ba Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -267,7 +267,7 @@ QString QbsSession::errorString(QbsSession::Error error)
|
||||
case Error::QbsFailedToStart:
|
||||
return tr("The qbs process failed to start.");
|
||||
case Error::ProtocolError:
|
||||
return tr("The qbs process sent invalid data.");
|
||||
return tr("The qbs process sent unexpected data.");
|
||||
case Error::VersionMismatch:
|
||||
return tr("The qbs API level is not compatible with what Qt Creator expects.");
|
||||
}
|
||||
@@ -534,6 +534,15 @@ void QbsSession::handlePacket(const QJsonObject &packet)
|
||||
} else if (type == "run-environment") {
|
||||
d->reply = packet;
|
||||
d->eventLoop.quit();
|
||||
} else if (type == "protocol-error") {
|
||||
const ErrorInfo errorInfo = ErrorInfo(packet.value("error").toObject());
|
||||
|
||||
// TODO: This loop occurs a lot. Factor it out.
|
||||
for (const ErrorInfoItem &item : errorInfo.items) {
|
||||
TaskHub::addTask(BuildSystemTask(Task::Error, item.description,
|
||||
item.filePath, item.line));
|
||||
}
|
||||
setError(Error::ProtocolError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user