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
ed494ad9
Commit
ed494ad9
authored
Feb 22, 2022
by
Waqar Ahmed
Committed by
Christoph Cullmann
Feb 22, 2022
Browse files
Sort by url instead of comparing strings
More consistent with S&R and `ls`
BUG: 435334
parent
c9970b6e
Pipeline
#141173
passed with stage
in 3 minutes and 37 seconds
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
addons/filetree/katefiletreeproxymodel.cpp
View file @
ed494ad9
...
...
@@ -46,9 +46,12 @@ bool KateFileTreeProxyModel::lessThan(const QModelIndex &left, const QModelIndex
}
case
KateFileTreeModel
::
PathRole
:
{
const
QString
left_name
=
model
->
data
(
left
,
KateFileTreeModel
::
PathRole
).
toString
();
const
QString
right_name
=
model
->
data
(
right
,
KateFileTreeModel
::
PathRole
).
toString
();
return
collate
.
compare
(
left_name
,
right_name
)
<
0
;
const
auto
l
=
model
->
data
(
left
,
KateFileTreeModel
::
DocumentRole
).
value
<
KTextEditor
::
Document
*>
();
const
auto
r
=
model
->
data
(
right
,
KateFileTreeModel
::
DocumentRole
).
value
<
KTextEditor
::
Document
*>
();
if
(
l
&&
r
)
{
return
l
->
url
()
<
r
->
url
();
}
return
false
;
}
case
KateFileTreeModel
::
OpeningOrderRole
:
...
...
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