Commit a1921d91 authored by Tobias Hunger's avatar Tobias Hunger

Qbs: Adapt to the latest round of API changes in Qbs

Change-Id: I59fd151a1a485990ca0da7dac4fdc028f915ec6b
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent e11ee899
......@@ -224,9 +224,9 @@ QVariantMap QbsBuildStep::toMap() const
void QbsBuildStep::buildingDone(bool success)
{
// Report errors:
foreach (const qbs::ErrorData &data, m_job->error().entries())
createTaskAndOutput(ProjectExplorer::Task::Error, data.description(),
data.codeLocation().fileName(), data.codeLocation().line());
foreach (const qbs::ErrorItem &item, m_job->error().items())
createTaskAndOutput(ProjectExplorer::Task::Error, item.description(),
item.codeLocation().fileName(), item.codeLocation().line());
QTC_ASSERT(m_fi, return);
m_fi->reportResult(success);
......
......@@ -179,9 +179,9 @@ QVariantMap QbsCleanStep::toMap() const
void QbsCleanStep::cleaningDone(bool success)
{
// Report errors:
foreach (const qbs::ErrorData &data, m_job->error().entries()) {
createTaskAndOutput(ProjectExplorer::Task::Error, data.description(),
data.codeLocation().fileName(), data.codeLocation().line());
foreach (const qbs::ErrorItem &item, m_job->error().items()) {
createTaskAndOutput(ProjectExplorer::Task::Error, item.description(),
item.codeLocation().fileName(), item.codeLocation().line());
}
QTC_ASSERT(m_fi, return);
......
......@@ -188,9 +188,9 @@ qbs::InstallOptions QbsInstallStep::installOptions() const
void QbsInstallStep::installDone(bool success)
{
// Report errors:
foreach (const qbs::ErrorData &data, m_job->error().entries()) {
createTaskAndOutput(ProjectExplorer::Task::Error, data.description(),
data.codeLocation().fileName(), data.codeLocation().line());
foreach (const qbs::ErrorItem &item, m_job->error().items()) {
createTaskAndOutput(ProjectExplorer::Task::Error, item.description(),
item.codeLocation().fileName(), item.codeLocation().line());
}
QTC_ASSERT(m_fi, return);
......
......@@ -68,13 +68,13 @@ void QbsLogSink::sendMessages()
mm->printToOutputPane(msg, Core::MessageManager::NoModeSwitch);
}
void QbsLogSink::doPrintWarning(const qbs::Error &warning)
void QbsLogSink::doPrintWarning(const qbs::ErrorInfo &warning)
{
foreach (const qbs::ErrorData &data, warning.entries())
foreach (const qbs::ErrorItem &item, warning.items())
emit newTask(ProjectExplorer::Task(ProjectExplorer::Task::Warning,
data.description(),
Utils::FileName::fromString(data.codeLocation().fileName()),
data.codeLocation().line(),
item.description(),
Utils::FileName::fromString(item.codeLocation().fileName()),
item.codeLocation().line(),
ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
}
......
......@@ -54,7 +54,7 @@ private slots:
void sendMessages();
private:
void doPrintWarning(const qbs::Error &warning);
void doPrintWarning(const qbs::ErrorInfo &warning);
void doPrintMessage(qbs::LoggerLevel level, const QString &message, const QString &tag);
QStringList m_messages;
......
......@@ -378,13 +378,13 @@ bool QbsProject::fromMap(const QVariantMap &map)
return true;
}
void QbsProject::generateErrors(const qbs::Error &e)
void QbsProject::generateErrors(const qbs::ErrorInfo &e)
{
foreach (const qbs::ErrorData &data, e.entries())
foreach (const qbs::ErrorItem &item, e.items())
taskHub()->addTask(ProjectExplorer::Task(ProjectExplorer::Task::Error,
data.description(),
Utils::FileName::fromString(data.codeLocation().fileName()),
data.codeLocation().line(),
item.description(),
Utils::FileName::fromString(item.codeLocation().fileName()),
item.codeLocation().line(),
ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
}
......@@ -394,8 +394,8 @@ void QbsProject::parse(const QVariantMap &config, const Utils::Environment &env,
qbs::SetupProjectParameters params;
params.setBuildConfiguration(config);
qbs::Error err = params.expandBuildConfiguration(m_manager->settings());
if (!err.entries().isEmpty()) {
qbs::ErrorInfo err = params.expandBuildConfiguration(m_manager->settings());
if (!err.hasError()) {
generateErrors(err);
return;
}
......
......@@ -120,7 +120,7 @@ private:
void parse(const QVariantMap &config, const Utils::Environment &env, const QString &dir);
void generateErrors(const qbs::Error &e);
void generateErrors(const qbs::ErrorInfo &e);
void prepareForParsing();
void updateDocuments(const qbs::ProjectData *prj);
void updateCppCodeModel(const qbs::ProjectData *prj);
......
......@@ -176,9 +176,9 @@ void QbsStep::jobDone(bool success)
{
// Report errors:
if (m_job) {
foreach (const qbs::ErrorData &data, m_job->error().entries())
createTaskAndOutput(ProjectExplorer::Task::Error, data.description(),
data.codeLocation().fileName(), data.codeLocation().line());
foreach (const qbs::ErrorItem &item, m_job->error().items())
createTaskAndOutput(ProjectExplorer::Task::Error, item.description(),
item.codeLocation().fileName(), item.codeLocation().line());
m_job->deleteLater();
m_job = 0;
}
......
Subproject commit c1b431e5389eda2f6952077e917f3118f98a6dbd
Subproject commit 36c7dba4ae3688e354f6e6985b3da4429b9084fd
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment