GSoC 2019: Plugin Manager (Week 6)

Posted 4 years ago

During the last week, I have been working on local plugin management. Though it essentially means moving the original plugin manager inside the resource manager, it took me more time than expected, since lots of code refactoring is needed. So now the complete workflow of installing and enabling a plugin can be achieved in the resource manager, and later we could make this even simpler by automagically enabling the plugin after getting installed.

A demo

the gif is a bit large...

local_plugin.gif

Some implementation details

The PluginManager class is however not removed, but adapted. I've made the class no longer a QDialog. It is now merely a QObject, and receives UI element pointers from the resource manager, and operates on them to display plugin info in the panel of ResourceManager. Also, the data structure that records installed plugins from the store, has been moved into the class from ResourceManager. together with serializing/deserializing routines.

The listview has been replaced by a treeview, in order that multiple qml files can be grouped by the packages they belong to. Local plugins, which do not belong to any packages, are shown in the bottom.

Known issues

  • Now uninstalling plugins will fail, probably because the compiled qmc file is being used by MuseScore and cannot be deleted directly. There should be a quick fix for it.
  • Some UI operations in the tree view are not consistent.

What to do next

The code is now untidy to me, including wrong indentions and redundant implementations(implementation of the original plugin manager is still there, which is not needed anymore).

Besides, currently there's no display in those textfields(plugin name, version, path, etc.) when a plugin package is selected. Maybe there ought to be some content for them.