Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
7bfb7a62
Commit
7bfb7a62
authored
Jun 08, 2010
by
dt
Browse files
Make clearing the build issue list way faster
parent
942b12da
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/projectexplorer/taskwindow.cpp
View file @
7bfb7a62
...
...
@@ -293,21 +293,30 @@ void TaskModel::clearTasks(const QString &categoryId)
endRemoveRows
();
m_maxSizeOfFileName
=
0
;
}
else
{
// TODO: Optimize this for consecutive rows
foreach
(
const
Task
&
task
,
m_tasksInCategory
.
value
(
categoryId
))
{
int
index
=
m_tasks
.
indexOf
(
task
);
Q_ASSERT
(
index
>=
0
);
beginRemoveRows
(
QModelIndex
(),
index
,
index
);
int
index
=
0
;
int
start
=
0
;
while
(
index
<
m_tasks
.
size
())
{
while
(
index
<
m_tasks
.
size
()
&&
m_tasks
.
at
(
index
).
category
!=
categoryId
)
{
++
start
;
++
index
;
}
if
(
index
==
m_tasks
.
size
())
break
;
while
(
index
<
m_tasks
.
size
()
&&
m_tasks
.
at
(
index
).
category
==
categoryId
)
{
++
index
;
}
// Index is now on the first non category
beginRemoveRows
(
QModelIndex
(),
start
,
index
-
1
);
m_tasks
.
removeAt
(
index
);
for
(
int
i
=
start
;
i
<
index
;
++
i
)
{
m_tasksInCategory
[
categoryId
].
removeOne
(
m_tasks
.
at
(
i
));
}
QList
<
Task
>
tasksInCategory
=
m_tasksInCategory
.
value
(
categoryId
);
tasksInCategory
.
removeOne
(
task
);
m_tasksInCategory
.
insert
(
categoryId
,
tasksInCategory
);
m_tasks
.
erase
(
m_tasks
.
begin
()
+
start
,
m_tasks
.
begin
()
+
index
);
endRemoveRows
();
index
=
start
;
}
// what to do with m_maxSizeOfFileName ?
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment