Introduce PluginManager
ClosedPublic

Authored by broulik on Jun 24 2019, 8:59 AM.

Details

Reviewers
fvogt
Group Reviewers
Plasma
Commits
R856:cc4436cf491c: Introduce PluginManager
Summary

This adds a dedicated class for loading/unloading and sending data to a plugin rather than doing it all in main().
It also keeps track of the loaded plugins and their supported version which the extension will query again in the future.
It could also potentially handle things like sending a reply to an incoming dataset by storing a reference/identifier to the request etc.

Test Plan
  • Loading and unloading plugins still works
  • Plugins still work

Behavior on browser side is unchanged and/or protocol structure

Diff Detail

Repository
R856 Plasma Browser Integration
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik created this revision.Jun 24 2019, 8:59 AM
Restricted Application added a project: Plasma. · View Herald TranscriptJun 24 2019, 8:59 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Jun 24 2019, 8:59 AM
broulik edited the summary of this revision. (Show Details)
fvogt added inline comments.Jun 25 2019, 8:40 AM
host/pluginmanager.cpp
40

Never called

70

I'd change this to accept the an AbstractBrowserPlugin pointer instead of the subsystem and do the lookup in bool PluginManager::loadPlugin(const QString &subsystem) instead.

Or just expose a PluginManager::pluginForSubsystem(subsystem) method.

broulik updated this revision to Diff 60996.Jul 2 2019, 10:31 AM
  • Operate on AbstractBrowserPlugin * exclusively
  • Cleanup
broulik updated this revision to Diff 60997.Jul 2 2019, 10:36 AM
  • Also remove pluginProtocolVersion, can just call AbstractBrowserPlugin::protocolVersion()
fvogt accepted this revision.Jul 5 2019, 11:20 AM
This revision is now accepted and ready to land.Jul 5 2019, 11:20 AM
This revision was automatically updated to reflect the committed changes.