SUMMARY The preview plugin takes mimetype from kate document type which results in selecting wrong preview kpart application. STEPS TO REPRODUCE 1. Open some Qt UI file in kate. Kate rightly sets its mode to XML. 2. Open preview toolview. The plugin shows preview with some kpart. OBSERVED RESULT The plugin see internal kate mode as XML, so it tries to search for applications capable of opening text/xml mimetype. In my case it finds khtml and opens it in it. If there is not preview kpart for text/xml mimetype it goes down the list and selects something which is base on xml, in my case it thought the UI file was text/rdf and started akregator. When kate mode is changed to something strange, what probably does not have default preview kpart, the plugin probably read file mimetype and selects kpart application based on that, which results in good preview. EXPECTED RESULT The preview application is decided on real file mimetype, not on kate mode. SOFTWARE/OS VERSIONS Operating System: Artix Linux KDE Plasma Version: 5.17.1 KDE Frameworks Version: 5.63.0 Qt Version: 5.13.1 Kernel Version: 4.19.80-1-lts OS Type: 64-bit Processors: 2 × Intel® Pentium® CPU B980 @ 2.40GHz Memory: 7,6 GiB of RAM ADDITIONAL INFORMATION Bad workaround is to set default application for text/xml (or any othe) mimetype to one which you preffer. The drawback is if you work with more filetypes which are using same mode in kate.
Can you please test and confirm if this issue is still occurring or if this bug report can be marked as resolved. I'm setting status to "needsinfo" pending your response, please change back to "reported" or "resolved" when you respond, thanks.
I tested it again and no change, how do you expect there to be a change to this bug when there was no change in the code?
The preview plugin is not maintained, if you want to have this improved, please submit a merge request, otherwise that will stay the way it is at the moment. https://kate-editor.org/join-us/