forked from qt-creator/qt-creator
BuildSteps: emitting tasks from init() works fine
Change-Id: Ida5c7e9eea197d12ebe6e4bd86e90b2ef7e7a100 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -274,8 +274,21 @@ bool QMakeStep::init()
|
||||
node = qt4bc->subNodeBuild();
|
||||
QString proFile = node->path();
|
||||
|
||||
m_tasks = qtVersion->reportIssues(proFile, workingDirectory);
|
||||
qSort(m_tasks);
|
||||
QList<ProjectExplorer::Task> tasks = qtVersion->reportIssues(proFile, workingDirectory);
|
||||
qSort(tasks);
|
||||
|
||||
if (!tasks.isEmpty()) {
|
||||
bool canContinue = true;
|
||||
foreach (const ProjectExplorer::Task &t, tasks) {
|
||||
addTask(t);
|
||||
if (t.type == Task::Error)
|
||||
canContinue = false;
|
||||
}
|
||||
if (!canContinue) {
|
||||
emit addOutput(tr("Configuration is faulty, please check the Issues view for details."), BuildStep::MessageOutput);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
m_scriptTemplate = node->projectType() == ScriptTemplate;
|
||||
|
||||
@@ -289,20 +302,6 @@ void QMakeStep::run(QFutureInterface<bool> &fi)
|
||||
return;
|
||||
}
|
||||
|
||||
// Warn on common error conditions:
|
||||
bool canContinue = true;
|
||||
foreach (const ProjectExplorer::Task &t, m_tasks) {
|
||||
addTask(t);
|
||||
if (t.type == Task::Error)
|
||||
canContinue = false;
|
||||
}
|
||||
if (!canContinue) {
|
||||
emit addOutput(tr("Configuration is faulty, please check the Issues view for details."), BuildStep::MessageOutput);
|
||||
fi.reportResult(false);
|
||||
emit finished();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!m_needToRunQMake) {
|
||||
emit addOutput(tr("Configuration unchanged, skipping qmake step."), BuildStep::MessageOutput);
|
||||
fi.reportResult(true);
|
||||
|
||||
Reference in New Issue
Block a user