-groups of groups are always themselves, this fixes extender::groups()
-extra check a group is actually an extendergroup type svn path=/trunk/KDE/kdelibs/; revision=1128074
This commit is contained in:
parent
aca321d765
commit
f26246c731
@ -98,6 +98,8 @@ ExtenderGroup::ExtenderGroup(Extender *parent, uint groupId)
|
||||
|
||||
connect(Plasma::Theme::defaultTheme(), SIGNAL(themeChanged()),
|
||||
this, SLOT(themeChanged()));
|
||||
|
||||
setGroup(this);
|
||||
}
|
||||
|
||||
ExtenderGroup::~ExtenderGroup()
|
||||
|
@ -375,8 +375,13 @@ void ExtenderItem::setGroup(ExtenderGroup *group)
|
||||
void ExtenderItem::setGroup(ExtenderGroup *group, const QPointF &pos)
|
||||
{
|
||||
if (isGroup()) {
|
||||
//nesting extender groups is just insane. I don't think we'd even want to support that.
|
||||
kWarning() << "Nesting ExtenderGroups is not supported";
|
||||
if (group == this) {
|
||||
//a group of a group is always just itself
|
||||
d->group = group;
|
||||
} else {
|
||||
//nesting extender groups is just insane. I don't think we'd even want to support that.
|
||||
kWarning() << "Nesting ExtenderGroups is not supported";
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@ -406,7 +411,7 @@ ExtenderGroup *ExtenderItem::group() const
|
||||
|
||||
bool ExtenderItem::isGroup() const
|
||||
{
|
||||
return (config().readEntry("isGroup", false));
|
||||
return (config().readEntry("isGroup", false) && qobject_cast<const Plasma::ExtenderGroup *>(this));
|
||||
}
|
||||
|
||||
bool ExtenderItem::isCollapsed() const
|
||||
|
Loading…
Reference in New Issue
Block a user