SUMMARY When a non-text file (such as source code) is opened in Kate, the file tab displays an icon showing the file type. If the file is edited, and then reloaded to discard the changes, this icon is replaced with text file icon STEPS TO REPRODUCE 1. Open a source code file in Kate (this bug certainly occurs with Go source code) 2. Edit the file, don't save 3. Reload the file, discard the changes OBSERVED RESULT The icon in the file tab is replaced with text file icon EXPECTED RESULT The icon goes back from "save" icon to the specific file type icon SOFTWARE/OS VERSIONS Linux/KDE Plasma: (available in About System) KDE Plasma Version: 6.0.5 KDE Frameworks Version: 6.2.0 Qt Version: 6.7.1
Hmm, true, that is funny.
Git commit fe4b2acd694e456005383d3f20f4637067d65989 by Christoph Cullmann. Committed on 15/09/2024 at 16:32. Pushed by cullmann into branch 'master'. fix mime-type icon after reload just relying on the modified signal is not good enough that fires in a state that the document has no content or url M +3 -0 addons/filetree/katefiletreemodel.cpp M +12 -6 apps/lib/kateviewspace.cpp M +1 -0 apps/lib/kateviewspace.h https://invent.kde.org/utilities/kate/-/commit/fe4b2acd694e456005383d3f20f4637067d65989
Good catch, we just missed to connect to the right signals for that case, was broken in the tab and the document list in the same way.