cascade corona -> containment -> applet immutability

svn path=/trunk/KDE/kdelibs/; revision=1177862
This commit is contained in:
Aaron J. Seigo 2010-09-21 14:21:58 +00:00
parent b53a6e5b0a
commit 6590d607fd

View File

@ -876,11 +876,18 @@ QString Applet::category(const QString &appletName)
ImmutabilityType Applet::immutability() const
{
//Returning the more strict immutability between the applet immutability and Corona one
//Returning the more strict immutability between the applet immutability, Containment and Corona
ImmutabilityType coronaImmutability = Mutable;
if (qobject_cast<Corona*>(scene())) {
coronaImmutability = static_cast<Corona*>(scene())->immutability();
Containment *cont = 0;
if (!d->isContainment) {
cont = containment();
}
if (cont) {
coronaImmutability = cont->immutability();
} else if (Corona *corona = qobject_cast<Corona*>(scene())) {
coronaImmutability = corona->immutability();
}
if (coronaImmutability == SystemImmutable) {