Plugins Manager: Show plugin status info

Currently if a plugin is broken the Python Plugins Manager disables the row and shows an error in the tooltip. That's not very discoverable, and disabling the widget also makes it impossible to disable a broken plugin via the GUI.

This MR doesn't disable the row of a broken plugin, instead changing the text to an error color. A new "Status" column will show the text "Broken", and clicking it will show the error message in a tab in the text browser that usually shows the plugin manual, making it easier to read or copy. The Status tab also shows the location of the plugin.

When a plugin is disabled it will show the disabled color to distinguish it from enabled plugins. (Debatable)

Additionally, the Comment column will show the comment as a tooltip instead of an error message, in case the comment field is elided. The Name column will still show errors in the tooltip.

Before and after images:

plugin-manager-before-fs8

plugin-manager-status-fs8

There's also a commit to change it so the plugin manual is loaded on request, since it seemed a little unnecessary to load them all in scanPlugins()?

Issues:

  • For some reason the other columns don't visually update immediately when enabling a plugin, which severely limits the usefulness of having a status column.

  • On Krita 5, KColorScheme will fetch a default text error color instead of from the theme, but it should be readable on most themes.

Note:

  • The Status column should also show "Unstable" if a plugin is flagged as such. That would happen if there was a problem with the plugin's dependencies. However, the dependencies property is never actually read from the .desktop file, so that will never happen. But investigating that is out of the scope of this MR.

Test Plan

  1. Create an error in a plugin.
  2. Open the Python Plugins Manager in settings and enable the broken plugin.
  3. Then try disabling it.

Bonus: Fix the error and re-enable the plugin.

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.
  • Does the patch add a user-visible feature? If yes, is there a documentation MR ready for it at Krita Documentation Repository?

Reminder: the reviewer is responsible for merging the patch, this is to ensure at the least two people can build the patch. In case a patch breaks the build, both the author and the reviewer should be contacted to fix the build. If this is not possible, the commits shall be reverted, and a notification with the reasoning and any relevant logs shall be sent to the mailing list, kimageshop@kde.org.

Merge request reports

Loading
Loading