-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()),
|
connect(Plasma::Theme::defaultTheme(), SIGNAL(themeChanged()),
|
||||||
this, SLOT(themeChanged()));
|
this, SLOT(themeChanged()));
|
||||||
|
|
||||||
|
setGroup(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
ExtenderGroup::~ExtenderGroup()
|
ExtenderGroup::~ExtenderGroup()
|
||||||
|
@ -375,8 +375,13 @@ void ExtenderItem::setGroup(ExtenderGroup *group)
|
|||||||
void ExtenderItem::setGroup(ExtenderGroup *group, const QPointF &pos)
|
void ExtenderItem::setGroup(ExtenderGroup *group, const QPointF &pos)
|
||||||
{
|
{
|
||||||
if (isGroup()) {
|
if (isGroup()) {
|
||||||
//nesting extender groups is just insane. I don't think we'd even want to support that.
|
if (group == this) {
|
||||||
kWarning() << "Nesting ExtenderGroups is not supported";
|
//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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -406,7 +411,7 @@ ExtenderGroup *ExtenderItem::group() const
|
|||||||
|
|
||||||
bool ExtenderItem::isGroup() 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
|
bool ExtenderItem::isCollapsed() const
|
||||||
|
Loading…
Reference in New Issue
Block a user