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)
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D9123
Makes it possible to use plugins that offer a metadata.json file.
Define the service type when falling back to the desktop file parser, so
the type system is proper.
Don't destroy a KPluginMetadata tuple to instanciate it right away.
REVIEW: 129102
It's reasnoble to expect people to download an applet just before trying
to change an existing applet using the alternatives system.
Therefore doing the check at applet initialisation time is semantically
wrong. Especially as it doesn't just disable the action but also skips
creating it.
Finally this gives a startup performance boost; loading all the applets
metadata takes a small amount of time (~20 milliseconds) not really
noticable when you're doing it once, but it adds up if you're doing it
over multiple applets sequentially.
ensure the scriptengine gets created also for c++ applets
that have a valid scriptengine, move the script init
out of applet::init that can be reimplemented.
remove the second appletscript constructor that is
not necessary anymore
REVIEWED-BY: Kai Uwe Broulik
both the comic and weather applet have to pick out the
_plasma_graphicsObject to access the AppletInterface
object just to set the busy property on it.
this reintroduces the busy proeprty in Applet too,
both setting it to Applet or AppletInterface
will keep them in sync
REVIEW:127411
make it possible to set icon and title from
the Applet subclass, making appletInterface (so plasmoid obj)
notice about the change and relay the notify signal
unbreak api of Applet::SetConfigurationRequired + add bindings to
appletInterface as properties.
new properties configurationRequired and configurationRequiredReason
Change-Id: I18ff01df94c1a0c5fac79ff801bfa76714c9f986
REVIEW:127218
For some applets the status is bound to a complex expression that can be
re-evaluated a lot. This ends up causing a lot of unnecassary updates.
REVIEW: 126471
This reverts commit 4e9b32d80d.
doesn't fix the problem and just introduces a memleak
(the crash is actually about a deleted containment,
so the problem is somewhere else)
CCMAIL:xiangzhai83@gmail.com
this ports most of libplasma away from sycoca, using instead
a combination of KPluginLoader and KPackage::PackageLoader instead
(so eventually using their own little caches instead of the
global sycoca cache)
a kservicetypetrader call is left in the loading of
containmentactions since is the only way to make an older
workspace still work, but is only a fallback, so containmentactions
in plasma-workspace can be ported eventually as well
Change-Id: Ie9579c3e01284f6d97043e22d01bbe63d3c3f45a
REVIEW:123626
if the immutability doesn't actuall change at startup,
don't emit immutabilityChanged even tough each applet needs
one ImmutableConstraint at start to correctly initialize
stuff
Change-Id: Id1fd40ffd62c09a2b092d13d7fb4c556cfb34994
Plasma::Package internally uses KPackage, being a pure wrapper.
old client code and old packagestructures still work using the wrapper.
old workspace code that is not directly using kpackage continues to work correctly
Change-Id: I05f95e8d05e3b67759973c4009e3753c61b1dcce
this is the little part in plasma-framework for the applet alternatives chooser.
works together the branch mart/alternativesConfig of plasma-workspace and plsma-desktop.
for how it looks and why, see the vdg forum thread:
https://forum.kde.org/viewtopic.php?f=285&t=122067&p=315919#p315919
still possible problems:
I'm not sure about using a new desktop file entry X-Plasma-Provides, maybe Categories could be enough, but it may produce many false positives as well
REVIEW:119409
It was connecting to a deprecated signal, use QAction::changed instead.
Since QAction::changed is more generic and modifying the shortcut seems
expensive, actually check that the property is different from the previous
value.
Reviewed by Vishesh Handa.
the remove action is now hooked to another slot, askDestroy()
it *MAY* solve the "Do you wish to remove this default desktop" bug, or may get it worse
CCBUG:332137