From af63967d29de8ed108e9eab11fb28d6e8255a24d Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Fri, 10 Aug 2012 14:13:55 +0200 Subject: [PATCH] Fix creator not showing warnings when building with missing tool chains Change-Id: I1e058a42f2bb0b0df00e403aae5d9cc47e960076 Reviewed-by: Eike Ziller --- src/plugins/qt4projectmanager/makestep.cpp | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/plugins/qt4projectmanager/makestep.cpp b/src/plugins/qt4projectmanager/makestep.cpp index fe2f9f6ef01..94a37123036 100644 --- a/src/plugins/qt4projectmanager/makestep.cpp +++ b/src/plugins/qt4projectmanager/makestep.cpp @@ -148,7 +148,7 @@ bool MakeStep::init() m_tasks.append(Task(Task::Error, tr("Qt Creator needs a build configuration set up to build. Configure a tool chain in Project mode."), Utils::FileName(), -1, Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM))); - return false; + return true; // otherwise the tasks will not get reported } ToolChain *tc = ToolChainProfileInformation::toolChain(target()->profile()); @@ -156,7 +156,7 @@ bool MakeStep::init() m_tasks.append(Task(Task::Error, tr("Qt Creator needs a tool chain set up to build. Configure a tool chain in the target options."), Utils::FileName(), -1, Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM))); - return false; + return true; // otherwise the tasks will not get reported } ProcessParameters *pp = processParameters(); @@ -278,18 +278,6 @@ bool MakeStep::init() void MakeStep::run(QFutureInterface & fi) { - if (m_scriptTarget) { - fi.reportResult(true); - return; - } - - if (!QFileInfo(m_makeFileToCheck).exists()) { - if (!ignoreReturnValue()) - emit addOutput(tr("Cannot find Makefile. Check your build settings."), BuildStep::MessageOutput); - fi.reportResult(ignoreReturnValue()); - return; - } - // Warn on common error conditions: bool canContinue = true; foreach (const Task &t, m_tasks) { @@ -303,6 +291,18 @@ void MakeStep::run(QFutureInterface & fi) return; } + if (m_scriptTarget) { + fi.reportResult(true); + return; + } + + if (!QFileInfo(m_makeFileToCheck).exists()) { + if (!ignoreReturnValue()) + emit addOutput(tr("Cannot find Makefile. Check your build settings."), BuildStep::MessageOutput); + fi.reportResult(ignoreReturnValue()); + return; + } + AbstractProcessStep::run(fi); }