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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user