Skip to content
GitLab
Menu
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
e6d75631
Commit
e6d75631
authored
Jan 11, 2022
by
Mark Nauwelaerts
Browse files
lspclient: only allow symbol view header toggle sort when applicable
See issue
#44
BUG: 447653
parent
65c0daf2
Pipeline
#122540
passed with stage
in 4 minutes and 20 seconds
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
addons/lspclient/lspclientsymbolview.cpp
View file @
e6d75631
...
...
@@ -16,6 +16,7 @@
#include <KTextEditor/View>
#include <QHBoxLayout>
#include <QHeaderView>
#include <QMenu>
#include <QPointer>
#include <QStandardItemModel>
...
...
@@ -433,11 +434,13 @@ public:
if
(
m_sortOn
->
isChecked
())
{
m_symbols
->
setSortingEnabled
(
true
);
m_symbols
->
sortByColumn
(
0
,
Qt
::
AscendingOrder
);
m_symbols
->
header
()
->
setSectionsClickable
(
true
);
}
else
{
// most servers provide items in reasonable file/input order
// however sadly not all, so let's sort by hidden line number column to make sure
m_symbols
->
setSortingEnabled
(
true
);
m_symbols
->
sortByColumn
(
1
,
Qt
::
AscendingOrder
);
m_symbols
->
header
()
->
setSectionsClickable
(
false
);
}
// no need to show internal info
m_symbols
->
setColumnHidden
(
1
,
true
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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