Plasma Plugin Loading
Aaron J. Seigo
aseigo at kde.org
Tue Sep 2 10:45:37 UTC 2014
On Tuesday, September 2, 2014 03.14:44 Sebastian Kügler wrote:
> per plugin queried, disk caches alleviate cases where the same plugins are
> read multiple times. Ultimately, the idea is to create a cache, but not
> ksycoca -- ask dfaure.
Last time I spoke with David about this the plan was to do something similar
to the mimetype cache where entries are added at install (and removed on
uninstall) requiring a procedure / command to be run when install happens.
This would seem to be pretty simple and something Plasma devs could even
implement just for Plasma::Package as a private internal feature in the
meantime; for Plasma, I bet a small sqlite db would be more than fast enough
and be quite easy to query.
He was hoping to work on this in the second half of this year IIRC. Perhaps
someone can ask him about it at Akademy.
> The change for plugins is that at build-time, we're now converting the
> .desktop file to json, and bake that information into the plugin through
Note that this is currently very limited: no i18n, very limited set of keys
supported .. it's enough to get information useful to load the plugin from Qt
but not enough to replace .desktop files.
If that is the ultimate goal for binary plugins, to make them fully self-
contained, I have a small utility on disk here that does nearly all of that.
The last thing missing is a routine to build the pot file for translators from
the contents of the plugin's json metadata, at which point one could move to
just json files. The utility includes a routine to turn a .desktop file into a
json file without loss of data.
Whatever path is taken, Plasma::PluginLoader is currently internally
inconsistent. Picking a path and then making all plugins load via the same
pattern would be fantastic for 3rd party developers wanting to work with the
system. Complicating things is that libplasma was already released in its
current state, including shipping plugin macros that don't work. The more time
that elapses with it in its current state the harder it will be to fix as
people write plugins using currently supported / advertised methods.
--
Aaron J. Seigo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20140902/d07626c0/attachment.sig>
More information about the Plasma-devel
mailing list