Commit f5224a6d authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Task: Add a new Task category for deployment issues



These are not build system issues and deserve their own category.

This has the side effect of avoiding them to get cleared when e.g.
reparsing Qbs files.

Change-Id: Ib949504533f7f15a560796bea91cae329f19a20b
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent ffe0b969
......@@ -573,7 +573,7 @@ bool AndroidDeployStep::deployPackage()
void AndroidDeployStep::raiseError(const QString &errorString)
{
emit addTask(Task(Task::Error, errorString, Utils::FileName::fromString(QString()), -1,
ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
ProjectExplorer::Constants::TASK_CATEGORY_DEPLOYMENT));
}
void AndroidDeployStep::writeOutput(const QString &text, OutputFormat format)
......
......@@ -892,7 +892,7 @@ void AndroidPackageCreationStep::raiseError(const QString &shortMsg,
{
emit addOutput(detailedMsg.isNull() ? shortMsg : detailedMsg, BuildStep::ErrorOutput);
emit addTask(Task(Task::Error, shortMsg, Utils::FileName::fromString(QString()), -1,
TASK_CATEGORY_BUILDSYSTEM));
TASK_CATEGORY_DEPLOYMENT));
}
const Core::Id AndroidPackageCreationStep::CreatePackageId("Qt4ProjectManager.AndroidPackageCreationStep");
......
......@@ -352,7 +352,7 @@ void MaemoDebianPackageCreationStep::checkProjectName()
"Debian packages.\nThey must only use lower-case letters, "
"numbers, '-', '+' and '.'.\n""We will try to work around that, "
"but you may experience problems."),
FileName(), -1, Core::Id(TASK_CATEGORY_BUILDSYSTEM)));
FileName(), -1, Core::Id(TASK_CATEGORY_DEPLOYMENT)));
}
}
......
......@@ -146,10 +146,12 @@ BuildManager::BuildManager(ProjectExplorerPlugin *parent, QAction *cancelBuildAc
void BuildManager::extensionsInitialized()
{
TaskHub::addCategory(Core::Id(Constants::TASK_CATEGORY_COMPILE),
TaskHub::addCategory(Constants::TASK_CATEGORY_COMPILE,
tr("Compile", "Category for compiler issues listed under 'Issues'"));
TaskHub::addCategory(Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM),
TaskHub::addCategory(Constants::TASK_CATEGORY_BUILDSYSTEM,
tr("Build System", "Category for build system issues listed under 'Issues'"));
TaskHub::addCategory(Constants::TASK_CATEGORY_DEPLOYMENT,
tr("Deployment", "Category for deployment issues listed under 'Issues'"));
}
BuildManager::~BuildManager()
......@@ -185,8 +187,9 @@ bool BuildManager::isBuilding() const
int BuildManager::getErrorTaskCount() const
{
const int errors =
d->m_taskWindow->errorTaskCount(Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM))
+ d->m_taskWindow->errorTaskCount(Core::Id(Constants::TASK_CATEGORY_COMPILE));
d->m_taskWindow->errorTaskCount(Constants::TASK_CATEGORY_BUILDSYSTEM)
+ d->m_taskWindow->errorTaskCount(Constants::TASK_CATEGORY_COMPILE)
+ d->m_taskWindow->errorTaskCount(Constants::TASK_CATEGORY_DEPLOYMENT);
return errors;
}
......@@ -273,8 +276,9 @@ void BuildManager::toggleTaskWindow()
bool BuildManager::tasksAvailable() const
{
const int count =
d->m_taskWindow->taskCount(Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM))
+ d->m_taskWindow->taskCount(Core::Id(Constants::TASK_CATEGORY_COMPILE));
d->m_taskWindow->taskCount(Constants::TASK_CATEGORY_BUILDSYSTEM)
+ d->m_taskWindow->taskCount(Constants::TASK_CATEGORY_COMPILE)
+ d->m_taskWindow->taskCount(Constants::TASK_CATEGORY_DEPLOYMENT);
return count > 0;
}
......@@ -293,8 +297,9 @@ void BuildManager::startBuildQueue(const QStringList &preambleMessage)
d->m_outputWindow->clearContents();
foreach (const QString &str, preambleMessage)
addToOutputWindow(str, BuildStep::MessageOutput, BuildStep::DontAppendNewline);
TaskHub::clearTasks(Core::Id(Constants::TASK_CATEGORY_COMPILE));
TaskHub::clearTasks(Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM));
TaskHub::clearTasks(Constants::TASK_CATEGORY_COMPILE);
TaskHub::clearTasks(Constants::TASK_CATEGORY_BUILDSYSTEM);
TaskHub::clearTasks(Constants::TASK_CATEGORY_DEPLOYMENT);
progressManager->setApplicationLabel(QString());
d->m_futureProgress = progressManager->addTask(d->m_progressFutureInterface->future(),
QString(),
......
......@@ -97,14 +97,16 @@ void BuildProgress::updateState()
{
if (!m_taskWindow)
return;
int errors = m_taskWindow->errorTaskCount(Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM))
+ m_taskWindow->errorTaskCount(Core::Id(Constants::TASK_CATEGORY_COMPILE));
int errors = m_taskWindow->errorTaskCount(Constants::TASK_CATEGORY_BUILDSYSTEM)
+ m_taskWindow->errorTaskCount(Constants::TASK_CATEGORY_COMPILE)
+ m_taskWindow->errorTaskCount(Constants::TASK_CATEGORY_DEPLOYMENT);
bool haveErrors = (errors > 0);
m_errorIcon->setEnabled(haveErrors);
m_errorLabel->setEnabled(haveErrors);
m_errorLabel->setText(QString::number(errors));
int warnings = m_taskWindow->warningTaskCount(Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM))
+ m_taskWindow->warningTaskCount(Core::Id(Constants::TASK_CATEGORY_COMPILE));
int warnings = m_taskWindow->warningTaskCount(Constants::TASK_CATEGORY_BUILDSYSTEM)
+ m_taskWindow->warningTaskCount(Constants::TASK_CATEGORY_COMPILE)
+ m_taskWindow->warningTaskCount(Constants::TASK_CATEGORY_DEPLOYMENT);
bool haveWarnings = (warnings > 0);
m_warningIcon->setEnabled(haveWarnings);
m_warningLabel->setEnabled(haveWarnings);
......
......@@ -188,6 +188,7 @@ const char DEVICE_SETTINGS_PAGE_ID[] = "AA.Device Settings";
// Task categories
const char TASK_CATEGORY_COMPILE[] = "Task.Category.Compile";
const char TASK_CATEGORY_BUILDSYSTEM[] = "Task.Category.Buildsystem";
const char TASK_CATEGORY_DEPLOYMENT[] = "Task.Category.Deploy";
// Wizard categories
const char QT_PROJECT_WIZARD_CATEGORY[] = "H.QtProjects";
......
......@@ -186,7 +186,7 @@ void BlackBerryAbstractDeployStep::raiseError(const QString &errorMessage)
{
emit addOutput(errorMessage, BuildStep::ErrorMessageOutput);
emit addTask(ProjectExplorer::Task(ProjectExplorer::Task::Error, errorMessage, Utils::FileName(), -1,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
ProjectExplorer::Constants::TASK_CATEGORY_DEPLOYMENT));
}
void BlackBerryAbstractDeployStep::processReadyReadStdOutput()
......
......@@ -170,7 +170,7 @@ void AbstractPackagingStep::raiseError(const QString &errorMessage)
{
emit addOutput(errorMessage, BuildStep::ErrorOutput);
emit addTask(Task(Task::Error, errorMessage, Utils::FileName(), -1,
Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)));
Constants::TASK_CATEGORY_DEPLOYMENT));
}
} // namespace RemoteLinux
......@@ -132,7 +132,7 @@ void AbstractRemoteLinuxDeployStep::handleErrorMessage(const QString &message)
{
emit addOutput(message, ErrorMessageOutput);
emit addTask(Task(Task::Error, message, Utils::FileName(), -1,
Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)));
Constants::TASK_CATEGORY_DEPLOYMENT));
d->hasError = true;
}
......@@ -140,7 +140,7 @@ void AbstractRemoteLinuxDeployStep::handleWarningMessage(const QString &message)
{
emit addOutput(message, ErrorMessageOutput);
emit addTask(Task(Task::Warning, message, Utils::FileName(), -1,
Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)));
Constants::TASK_CATEGORY_DEPLOYMENT));
}
void AbstractRemoteLinuxDeployStep::handleFinished()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment