reuse KPackage instance between PluginLoader and Applet
ClosedPublic

Authored by mart on Dec 3 2017, 12:01 PM.

Details

Summary

to minimize metadata lookups, pass the kpackage created in pluginloader
to the applet itself as args. the args structure will be used only by the
internal constructor and applet sublasses will get their args unaltered

Test Plan

plasma loads correctly, from 3 kpackage instantiation per applet to 2
(last is in the access manager)

Diff Detail

Repository
R242 Plasma Framework (Library)
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mart created this revision.Dec 3 2017, 12:01 PM
Restricted Application added projects: Plasma, Frameworks. · View Herald TranscriptDec 3 2017, 12:01 PM
Restricted Application added subscribers: Frameworks, plasma-devel. · View Herald Transcript
mart requested review of this revision.Dec 3 2017, 12:01 PM
davidedmundson added inline comments.
src/plasma/applet.cpp
98

If anyone uses the old argument list syntax (where the first argument was a string or a kpluginmetadata) this will break.

Can we be sure that the PluginLoader was the only user?
It was a somewhat undocumented thing right?

mart added inline comments.Dec 8 2017, 11:22 AM
src/plasma/applet.cpp
98

yes, was completely undocumented.
it was the only user and safe-ish to assume it continues to as is protected

davidedmundson accepted this revision.Dec 8 2017, 11:43 AM
This revision is now accepted and ready to land.Dec 8 2017, 11:43 AM
This revision was automatically updated to reflect the committed changes.