Summary: | The URL navigator shows child directories in improper order in some cases | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kio | Reporter: | Eduardo <eduardo.cruz> |
Component: | URL navigator | Assignee: | Eduardo <eduardo.cruz> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kdelibs-bugs-null |
Priority: | NOR | ||
Version First Reported In: | git master | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/frameworks/kio/commit/db1a36729e3cfd741768962e17cc556b00863be2 | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | Screenshot showing the bugged ordering |
Assigning to myself, I will investigate and try to fix it. Most likely it is ordering considering the trailing "/" that it adds on the dropdown list text entries, and that is what's causing the bug. A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kcompletion/-/merge_requests/19 A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/593 Git commit 1d8d0741da4e45d2c91e5eee98c1ba5b9a56b204 by Méven Car, on behalf of Eduardo Cruz. Committed on 18/10/2021 at 17:12. Pushed by meven into branch 'master'. New KCompletion::setSorterFunction() to allow custom sorting by providing function M +20 -9 src/kcompletion.cpp M +19 -1 src/kcompletion.h M +10 -2 src/kcompletion_p.h https://invent.kde.org/frameworks/kcompletion/commit/1d8d0741da4e45d2c91e5eee98c1ba5b9a56b204 Git commit db1a36729e3cfd741768962e17cc556b00863be2 by Méven Car, on behalf of Eduardo Cruz. Committed on 19/10/2021 at 11:42. Pushed by meven into branch 'master'. KUrlCompletion: Disregard the trailing slash when sorting directory paths M +14 -0 src/widgets/kurlcompletion.cpp https://invent.kde.org/frameworks/kio/commit/db1a36729e3cfd741768962e17cc556b00863be2 |
Created attachment 141711 [details] Screenshot showing the bugged ordering SUMMARY The URL navigator shows child directories in improper order in some cases. If there is a child directory named "somefolder", and another child directory named "somefolder_A", the latter is incorrectly displayed first in the list of suggestions, contrary to the order that Dolphin itself displays its directories. If using the "Automatic" or "Dropdown List & Automatic", this actually causes a very annoying behavior that makes it pretty hard to enter "somefolder". If we type in the exact full path to "somefolder" (without the trailing slash), the completion mechanism will suggest "somefolder_A" and that is where we are taken if we press ENTER. This also happens if we have a "somefolder.A" or "somefolder-A", probably even other special characters. It doesn't happen if the next character after the "somefolder" string is a letter or a number. See attached screenshot for clarification. STEPS TO REPRODUCE 1. Create a folder named "~/test" 2. Inside this new "~/test" folder, create directories "somefolder" and "somefolder_A" 3. In Dolphin, make the location bar editable, right-click it and make sure "Dropdown List & Automatic" is selected under the "Text Completion" menu. 4. Manually type "~/test/somefolder" (without quotes) into the location bar, but don't press ENTER yet. 5. Observe the bugged ordering in the dropdown list 6. Observe that it is suggesting to autocomplete to "~/test/somefolder_A" 7. Press ENTER. You will be taken to "~/test/somefolder_A". But you typed the exact path to "~/test/somefolder", your intention was likely to go to "~/test/somefolder". OBSERVED RESULT We see that special characters currently have priority over an "End-Of-String" char in this ordering EXPECTED RESULT "End-Of-String" char should have priority over any other character SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 5.22.5 KDE Frameworks Version: 5.86.0 Qt Version: 5.15.2 Kernel Version: 5.14.5-arch1 (64-bit) Graphics Platform: X11