forked from qt-creator/qt-creator
Unify "missing compiler" and "missing build configuration" tasks
Everybody used to do their own thing... Also unify the "Configuration is faulty" message we write into the Application output window. Change-Id: I0e5c4ec68155d66aa1d0ea53134b98917869e5c6 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -110,17 +110,18 @@ bool IosBuildStep::init()
|
||||
BuildConfiguration *bc = buildConfiguration();
|
||||
if (!bc)
|
||||
bc = target()->activeBuildConfiguration();
|
||||
if (!bc)
|
||||
emit addTask(Task::buildConfigurationMissingTask());
|
||||
|
||||
ToolChain *tc = ToolChainKitInformation::toolChain(target()->kit());
|
||||
if (!tc) {
|
||||
Task t = Task(Task::Error, tr("Qt Creator needs a compiler set up to build. Configure a compiler in the kit preferences."),
|
||||
Utils::FileName(), -1,
|
||||
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
|
||||
emit addTask(t);
|
||||
emit addOutput(tr("Configuration is faulty. Check the Issues output pane for details."),
|
||||
BuildStep::MessageOutput);
|
||||
if (!tc)
|
||||
emit addTask(Task::compilerMissingTask());
|
||||
|
||||
if (!bc || !tc) {
|
||||
emitFaultyConfigurationMessage();
|
||||
return false;
|
||||
}
|
||||
|
||||
ProcessParameters *pp = processParameters();
|
||||
pp->setMacroExpander(bc->macroExpander());
|
||||
pp->setWorkingDirectory(bc->buildDirectory().toString());
|
||||
|
||||
Reference in New Issue
Block a user