Commit 3e9c3269 authored by Daniel Teske's avatar Daniel Teske

Issues Pane: Fix badge number on clearing tasks of unknown type

Task-number: QTCREATORBUG-7893

Change-Id: I80870916081bc3b7464417173b74020aed40d485
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent 05be9bbd
......@@ -70,6 +70,13 @@ int TaskModel::warningTaskCount(const Core::Id &categoryId)
return m_categories.value(categoryId).warnings;
}
int TaskModel::unknownTaskCount(const Core::Id &categoryId)
{
return m_categories.value(categoryId).count
- m_categories.value(categoryId).errors
- m_categories.value(categoryId).warnings;
}
bool TaskModel::hasFile(const QModelIndex &index) const
{
int row = index.row();
......
......@@ -74,6 +74,7 @@ public:
int taskCount(const Core::Id &categoryId);
int errorTaskCount(const Core::Id &categoryId);
int warningTaskCount(const Core::Id &categoryId);
int unknownTaskCount(const Core::Id &categoryId);
bool hasFile(const QModelIndex &index) const;
......
......@@ -341,6 +341,8 @@ void TaskWindow::clearTasks(const Core::Id &categoryId)
d->m_badgeCount -= d->m_model->errorTaskCount(categoryId);
if (d->m_filter->filterIncludesWarnings())
d->m_badgeCount -= d->m_model->warningTaskCount(categoryId);
if (d->m_filter->filterIncludesUnknowns())
d->m_badgeCount -= d->m_model->unknownTaskCount(categoryId);
} else {
d->m_badgeCount = 0;
}
......
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