Bug 422748

Summary: Last opened folder should be highlighted after we click on "Back" or "Go up" buttons
Product: [Frameworks and Libraries] frameworks-kio Reporter: Patrick Silva <bugseforuns>
Component: Open/save dialogsAssignee: KIO Bugs <kio-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: kdelibs-bugs
Priority: NOR    
Version: git master   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In: 5.72
Sentry Crash Report:

Description Patrick Silva 2020-06-10 14:20:53 UTC
SUMMARY
In Dolphin the last opened folder is highlighted after we click on "Go back" or "Go up" buttons. However, file open/save dialogs don't behave in the same way.

STEPS TO REPRODUCE
1. open kate
2. trigger file open or file save dialogs
3. open any folder
4. click on "Back" or "Go up" buttons on top

OBSERVED RESULT
the folder opened in the step 3 isn't highlighted

EXPECTED RESULT
the folder opened in the step 3 should be highlighted

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.19.80
KDE Frameworks Version: 5.71.0
Qt Version: 5.14.2
Comment 1 Bug Janitor Service 2020-06-20 09:07:04 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/58
Comment 2 Ahmad Samir 2020-06-21 22:00:49 UTC
Git commit 5f4a501f992a534b569324f95941459c27c61588 by Ahmad Samir.
Committed on 21/06/2020 at 21:16.
Pushed by ahmadsamir into branch 'master'.

[KDirOperator] Highlight the previous dir when going back/up

We have a couple of cases:
 - starting in a/, going to b/, then back(), b is highlighted
 - starting in a/b/, cdUp to "a", "b" is highlighted
 - starting in a/b/c/, cdUp twice to "a", back(), "c" is highlighted

This is useful for orienting oneself while navigating in kfilewidget,
especially in big directories. This can be controlled with
setEnableDirHighlighting().

Add unit test to kdiroperatortest.
FIXED-IN: 5.72

M  +57   -0    autotests/kdiroperatortest.cpp
M  +29   -5    src/filewidgets/kdiroperator.cpp

https://invent.kde.org/frameworks/kio/commit/5f4a501f992a534b569324f95941459c27c61588