Warn if kit has no tool chain set up

Change-Id: I551402c1e3023feeeb127f001a0e908938a07fc2
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
Tobias Hunger
2012-09-06 13:13:12 +02:00
parent 8b05f1afaf
commit 9d90f8b396
7 changed files with 71 additions and 17 deletions

View File

@@ -144,18 +144,11 @@ bool MakeStep::init()
bc = qobject_cast<Qt4BuildConfiguration *>(target()->activeBuildConfiguration());
m_tasks.clear();
if (!bc) {
m_tasks.append(Task(Task::Error, tr("Qt Creator needs a build configuration set up to build. Configure a target in Project mode."),
Utils::FileName(), -1,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
return true; // otherwise the tasks will not get reported
}
ToolChain *tc = ToolChainKitInformation::toolChain(target()->kit());
if (!tc) {
m_tasks.append(Task(Task::Error, tr("Qt Creator needs a compiler set up to build. Configure a compiler in the target options."),
Utils::FileName(), -1,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
m_tasks.append(Task(Task::Error, tr("Qt Creator needs a compiler set up to build. Configure a compiler in the kit options."),
Utils::FileName(), -1,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
return true; // otherwise the tasks will not get reported
}
@@ -278,12 +271,10 @@ bool MakeStep::init()
void MakeStep::run(QFutureInterface<bool> & fi)
{
// Warn on common error conditions:
bool canContinue = true;
foreach (const Task &t, m_tasks) {
addTask(t);
if (t.type == Task::Error)
canContinue = false;
canContinue = false;
}
if (!canContinue) {
emit addOutput(tr("Configuration is faulty. Check the Issues view for details."), BuildStep::MessageOutput);