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
Utilities
Kate
Commits
127c5c1f
Commit
127c5c1f
authored
Nov 05, 2022
by
Waqar Ahmed
Browse files
lsp: remove diagnostic model rows in groups
(cherry picked from commit
4b605683
)
parent
8cfbc4e1
Pipeline
#262791
canceled with stage
in 7 minutes and 48 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
addons/lspclient/lspclientpluginview.cpp
View file @
127c5c1f
...
...
@@ -2902,15 +2902,29 @@ public:
}
// check and clear defunct entries
const
auto
&
model
=
*
m_diagnosticsModel
;
// Remove rows in groups
int
start
=
-
1
,
count
=
0
;
for
(
int
i
=
0
;
i
<
model
.
rowCount
();
++
i
)
{
auto
item
=
model
.
item
(
i
);
if
(
item
&&
!
fpaths
.
contains
(
item
->
text
()))
{
item
->
setRowCount
(
0
);
if
(
m_diagnosticsTree
)
{
m_diagnosticsTree
->
setRowHidden
(
item
->
row
(),
QModelIndex
(),
true
);
if
(
start
==
-
1
)
{
start
=
i
;
}
count
+=
1
;
}
else
{
if
(
start
>
-
1
&&
count
!=
0
)
{
m_diagnosticsModel
->
removeRows
(
start
,
count
);
i
=
start
-
1
;
// reset i
}
start
=
-
1
;
count
=
0
;
}
}
if
(
start
!=
-
1
&&
count
!=
0
)
{
m_diagnosticsModel
->
removeRows
(
start
,
count
);
}
}
void
onTextChanged
(
KTextEditor
::
Document
*
doc
)
...
...
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