Bug 435334

Summary: Document Tree View: order does not fit the one of Search & Replace
Product: [Applications] kate Reporter: Dmitri Koulikoff <kde>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: nate
Priority: NOR    
Version First Reported In: 20.12.3   
Target Milestone: ---   
Platform: Slackware   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Dmitri Koulikoff 2021-04-04 07:12:48 UTC
SUMMARY 

If I set Document Tree View Sort by to "document path" the order is wrong. It differs from the order in ls and the order Search & Replace shows.


STEPS TO REPRODUCE
1. create the file named 'a.txt' with content "test-qqq"
2. create the file named 'a_1.txt' with content "test-qqq"
3. Right-click the Documents panel and set Sort By to "Document Path"
4. Open Search & Replace, enter "test-qqq" into Find field and click "Search"


OBSERVED RESULT

the order of the files in Documents is 
- a_1.txt
- a.txt

the order of the files in Search & Replace is
- a.txt
- a_1.txt

the order of the files in ls is 
- a.txt
- a_1.txt


EXPECTED RESULT

Everywhere the order must be
- a.txt
- a_1.txt


SOFTWARE/OS VERSIONS
Operating System: Slackware-current
KDE Plasma Version: 5.21.3
KDE Frameworks Version: 5.80.0
Qt Version: 5.15.2
Kernel Version: 5.10.27
OS Type: 64-bit
Graphics Platform: X11
Processors: 12 × Intel® Core™ i7-9750H CPU @ 2.60GHz
Memory: 31.1 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 630
Comment 1 Bug Janitor Service 2022-02-22 15:14:11 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/631
Comment 2 Christoph Cullmann 2022-02-22 18:06:10 UTC
Git commit ed494ad93f54c95e65caf6356dd717ca6c54ab95 by Christoph Cullmann, on behalf of Waqar Ahmed.
Committed on 22/02/2022 at 18:02.
Pushed by cullmann into branch 'master'.

Sort by url instead of comparing strings

More consistent with S&R and `ls`

M  +6    -3    addons/filetree/katefiletreeproxymodel.cpp

https://invent.kde.org/utilities/kate/commit/ed494ad93f54c95e65caf6356dd717ca6c54ab95