QbsProjectManager: Add "clean" and "rebuild" actions for products

... and sub-projects. We used to have only the "build" action for these.

Task-number: QTCREATORBUG-15919
Change-Id: I31d06498c0cdadb8a8738be521a98e8b03de32ee
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Christian Kandeler
2017-04-07 13:46:50 +02:00
parent 27c8c74813
commit b2be9b5b0a
7 changed files with 258 additions and 32 deletions

View File

@@ -87,6 +87,7 @@ bool QbsCleanStep::init(QList<const BuildStep *> &earlierSteps)
if (!bc)
return false;
m_products = bc->products();
return true;
}
@@ -97,9 +98,10 @@ void QbsCleanStep::run(QFutureInterface<bool> &fi)
QbsProject *pro = static_cast<QbsProject *>(project());
qbs::CleanOptions options(m_qbsCleanOptions);
m_job = pro->clean(options);
QString error;
m_job = pro->clean(options, m_products, error);
if (!m_job) {
emit addOutput(error, OutputFormat::ErrorMessage);
reportRunResult(*m_fi, false);
return;
}