make extender::groups() work without assigning groups to themselves
svn path=/trunk/KDE/kdelibs/; revision=1128236
This commit is contained in:
parent
6eade776e2
commit
3aee2db14e
@ -281,11 +281,12 @@ Extender::Appearance Extender::appearance() const
|
||||
|
||||
QList<ExtenderGroup*> Extender::groups() const
|
||||
{
|
||||
QList<ExtenderGroup*> result;
|
||||
QList<ExtenderGroup *> result;
|
||||
foreach (ExtenderItem *item, d->attachedExtenderItems) {
|
||||
if (item->isGroup() && !result.contains(item->group())) {
|
||||
if (item->group()) {
|
||||
result.append(item->group());
|
||||
ExtenderGroup *group = qobject_cast<ExtenderGroup *>(item);
|
||||
if (group) {
|
||||
result.append(group);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -99,7 +99,6 @@ ExtenderGroup::ExtenderGroup(Extender *parent, uint groupId)
|
||||
connect(Plasma::Theme::defaultTheme(), SIGNAL(themeChanged()),
|
||||
this, SLOT(themeChanged()));
|
||||
|
||||
setGroup(this);
|
||||
}
|
||||
|
||||
ExtenderGroup::~ExtenderGroup()
|
||||
|
@ -375,13 +375,8 @@ void ExtenderItem::setGroup(ExtenderGroup *group)
|
||||
void ExtenderItem::setGroup(ExtenderGroup *group, const QPointF &pos)
|
||||
{
|
||||
if (isGroup()) {
|
||||
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";
|
||||
}
|
||||
//nesting extender groups is just insane. I don't think we'd even want to support that.
|
||||
kWarning() << "Nesting ExtenderGroups is not supported";
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user