make sure to not emit immutabilityChanged at startup
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
This commit is contained in:
parent
117898f4ed
commit
fac1100fff
@ -521,7 +521,12 @@ void Applet::flushPendingConstraintsEvents()
|
||||
action->setEnabled(canConfig);
|
||||
}
|
||||
|
||||
emit immutabilityChanged(immutability());
|
||||
//an immutable constraint will alwasy happen at startup
|
||||
//make sure don't emit a change signal for nothing
|
||||
if (d->oldImmutability != immutability()) {
|
||||
emit immutabilityChanged(immutability());
|
||||
}
|
||||
d->oldImmutability = immutability();
|
||||
}
|
||||
|
||||
// now take care of constraints in special subclass: Contaiment
|
||||
|
@ -53,6 +53,7 @@ AppletPrivate::AppletPrivate(KService::Ptr service, const KPluginInfo *info, int
|
||||
: appletId(uniqueID),
|
||||
q(applet),
|
||||
immutability(Types::Mutable),
|
||||
oldImmutability(Types::Mutable),
|
||||
appletDescription(info ? *info : KPluginInfo(service)),
|
||||
icon(appletDescription.isValid() ? appletDescription.icon() : QString()),
|
||||
mainConfig(0),
|
||||
|
@ -81,6 +81,7 @@ public:
|
||||
|
||||
// applet attributes
|
||||
Types::ImmutabilityType immutability;
|
||||
Types::ImmutabilityType oldImmutability;
|
||||
QString launchErrorMessage;
|
||||
|
||||
// applet info we keep around in case its needed
|
||||
|
Loading…
Reference in New Issue
Block a user