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:
Tobias Hunger
2014-06-20 14:32:40 +02:00
parent 43735f28dd
commit 4eb2908c44
10 changed files with 70 additions and 34 deletions

View File

@@ -32,6 +32,8 @@
#include <coreplugin/coreconstants.h>
#include <utils/qtcassert.h>
#include "projectexplorerconstants.h"
namespace ProjectExplorer
{
@@ -69,6 +71,26 @@ Task::Task(TaskType type_, const QString &description_,
++s_nextId;
}
Task Task::compilerMissingTask()
{
return Task(Task::Error,
QCoreApplication::translate("ProjectExplorer::Task",
"Qt Creator needs a compiler set up to build. "
"Configure a compiler in the kit options."),
Utils::FileName(), -1,
ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM);
}
Task Task::buildConfigurationMissingTask()
{
return Task(Task::Error,
QCoreApplication::translate("ProjectExplorer::Task",
"Qt Creator needs a build configuration set up to build. "
"Configure a build configuration in the project settings."),
Utils::FileName(), -1,
ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM);
}
void Task::addMark(TextEditor::BaseTextMark *mark)
{
QTC_ASSERT(m_mark.isNull(), return);