GSoC 2019: Plugin Manager (Week 8)

Posted 5 years ago

Hi!

I have smoothly finished what I planned to do last week:

  1. Background fetching metadata about plugins, extensions and languages. The resource manager launches much faster now, and the user is now able to operate on installed plugins no matter whether the plugin store, languages or extensions finish loading.

    loading2.gif

  2. Displaying plugin package descriptions. The descriptions are fetched from each plugin's detail page. And only the specific HTML div section is fetched.

    description.gif

Besides, I had to deal with several crash cases that multi-threading codes introduced. These crashes typically happened when the user closes Resource Manager while several working threads(including those fetching metedata and checking for plugins' update) still persist. Then those threads hold an invalid reference to Resource Manager(and its UI elements), which has already been deleted.

I tried to find a way to stop/kill these threads from a QThreadPool when Resource Manager is closed, but there seems no relevant APIs that can achieve this.

So I made most operations with UI elements in member function slots of Resource Manager, and trigger them using signals in other background threads. This way, even if Resource Manager is destroyed, the signals get disconnected and prevent operations to invalid UI elements. This solution prevents some crashes. However, a few other crashes still need to be investigated.

What to do next

Actually I find the to-do list unclearer than before, because from now on, there probably need to be more refinement than new features. There're indeed some possible new features unimplemented left in the PR page, but refinements on existing features are probably more worthy.

So I'll first fix the remaining crashes mentioned above.

Since the number of 3.x plugins grows gradually, which is good news, I will continue test the downloading routine for new 3.x plugins and make sure every plugin that has been published in a reasonable manner is parsed and downloaded correctly.