Bug 451098

Summary: Changing open file does not update projects sidebar
Product: [Applications] kate Reporter: Nicolas Fella <nicolas.fella>
Component: applicationAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: christoph
Priority: NOR    
Version First Reported In: Git   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Nicolas Fella 2022-03-03 17:28:31 UTC
STEPS TO REPRODUCE
1. Open a file in project 'foo'. The projects sidebar shows the files from 'foo'
2. Open a file from project 'bar'

OBSERVED RESULT
Project sidebar shows files from 'foo'
Switching between the two files does not update the projects sidebar

EXPECTED RESULT
Project sidebar shows files from 'bar'
Switching between files updates the projects sidebar

SOFTWARE/OS VERSIONS
KDE Frameworks Version: master
Qt Version: 5.15-kde

ADDITIONAL INFORMATION

Bisected to https://invent.kde.org/utilities/kate/-/merge_requests/621
Comment 1 Christoph Cullmann 2022-03-03 18:26:31 UTC
For me it still does.
Are that projects with .kateproject files or are that auto-generated projects from e.g. git?
Comment 2 Nicolas Fella 2022-03-03 18:28:25 UTC
These are from git repos, without .kateproject
Comment 3 Christoph Cullmann 2022-03-03 18:37:04 UTC
Ok, thanks.
Need to try this then.
This gives some ideas how my change could have borked that!
Comment 4 Bug Janitor Service 2022-03-03 19:12:41 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/654
Comment 5 Christoph Cullmann 2022-03-03 19:16:52 UTC
Yeah, ok, guess I found the culprit.
Was no clever idea to think one could just purge the fileName for auto-generated projects.
Comment 6 Christoph Cullmann 2022-03-03 19:25:51 UTC
Ok, fixed.
Was only broken in master, but in no released version.
Comment 7 Christoph Cullmann 2022-03-03 19:32:57 UTC
Thanks for helping to find this.
As I in most cases use just .kateproject based projects, I would not have noticed this regression!