summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer/buildmanager.cpp
diff options
context:
space:
mode:
authorChristian Kamm <christian.d.kamm@nokia.com>2011-08-10 08:21:10 +0200
committerChristian Kamm <christian.d.kamm@nokia.com>2011-08-16 11:06:23 +0200
commit13c8f9eaaae4adf7d4dc92cc6cb1f0d5cd3995b0 (patch)
tree1014abdea7ae28fee18cdfe86621e52fe55acb7b /src/plugins/projectexplorer/buildmanager.cpp
parentbf8cb5d4fce66010a8f1c22ccc49cb5e15f55ef4 (diff)
downloadqt-creator-13c8f9eaaae4adf7d4dc92cc6cb1f0d5cd3995b0.tar.gz
BuildManager: Only pop up build issues if there are relevant issues.
Previously it also poped up and showed a build failure if there were any error-type tasks in 'My Tasks', 'Analyser' or 'QML'. Change-Id: Ie86be0afe1f0b7571b2cb764b7c53f282183b513 Reviewed-on: http://codereview.qt.nokia.com/2807 Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Diffstat (limited to 'src/plugins/projectexplorer/buildmanager.cpp')
-rw-r--r--src/plugins/projectexplorer/buildmanager.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/plugins/projectexplorer/buildmanager.cpp b/src/plugins/projectexplorer/buildmanager.cpp
index 13f54b1c63..ba258e13bb 100644
--- a/src/plugins/projectexplorer/buildmanager.cpp
+++ b/src/plugins/projectexplorer/buildmanager.cpp
@@ -228,7 +228,9 @@ void BuildManager::cancel()
void BuildManager::updateTaskCount()
{
Core::ProgressManager *progressManager = Core::ICore::instance()->progressManager();
- const int errors = d->m_taskWindow->errorTaskCount();
+ const int errors =
+ d->m_taskWindow->errorTaskCount(Constants::TASK_CATEGORY_BUILDSYSTEM)
+ + d->m_taskWindow->errorTaskCount(Constants::TASK_CATEGORY_COMPILE);
if (errors > 0) {
progressManager->setApplicationLabel(QString::number(errors));
} else {
@@ -287,7 +289,10 @@ void BuildManager::toggleTaskWindow()
bool BuildManager::tasksAvailable() const
{
- return d->m_taskWindow->taskCount() > 0;
+ const int count =
+ d->m_taskWindow->taskCount(Constants::TASK_CATEGORY_BUILDSYSTEM)
+ + d->m_taskWindow->taskCount(Constants::TASK_CATEGORY_COMPILE);
+ return count > 0;
}
void BuildManager::startBuildQueue()
@@ -327,7 +332,7 @@ void BuildManager::startBuildQueue()
void BuildManager::showBuildResults()
{
- if (d->m_taskWindow->taskCount() != 0)
+ if (tasksAvailable())
toggleTaskWindow();
else
toggleOutputWindow();