[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/libs/taskmanager
From: Marco Martin <notmart () gmail ! com>
Date: 2010-08-18 12:51:56
Message-ID: 20100818125156.04F27AC855 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1165178 by mart:
at the beginning of its life, a group doesn't have a parent, so thinks being root. \
when it gains one, add the connections to itemchanged
M +10 -0 taskgroup.cpp
--- trunk/KDE/kdebase/workspace/libs/taskmanager/taskgroup.cpp #1165177:1165178
@@ -180,17 +180,27 @@
if (item->parentGroup()) {
item->parentGroup()->remove(item);
+ } else if (item->isGroupItem()) {
+ TaskGroup *group = qobject_cast<TaskGroup*>(item);
+ if (group) {
+ foreach (AbstractGroupableItem *subItem, group->members()) {
+ connect(subItem, SIGNAL(changed(::TaskManager::TaskChanges)),
+ item, SLOT(itemChanged(::TaskManager::TaskChanges)), \
Qt::UniqueConnection); }
+ }
+ }
d->members.append(item);
item->setParentGroup(this);
connect(item, SIGNAL(destroyed(AbstractGroupableItem*)),
this, SLOT(itemDestroyed(AbstractGroupableItem*)));
+ //if the item will gain a parent those connections will be added by the if up \
there if (!isRootGroup()) {
connect(item, SIGNAL(changed(::TaskManager::TaskChanges)),
this, SLOT(itemChanged(::TaskManager::TaskChanges)));
}
+
//For debug
/* foreach (AbstractGroupableItem *item, d->members) {
if (item->isGroupItem()) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic