Taskmanager with grouping support preview version

christian mollekopf chrigi_1 at hotmail.com
Tue Jul 8 22:53:29 CEST 2008



> > Okay, but if i make the AbstractGroupableItem unguarded, wouldn't this make
> > tasks stored as AbstractGroupableItem unguarded?
> 
> if an AbstractGroupableItem holds onto a TaskPtr, the TaskPtr is guaranteed to 
> stick around as long as there is one AbstractGroupableItem referencing it. 
> that's why it's critical that TaskPtr is always used and TaskPtr::data() is 
> never stored.

Sorry i dont get how to do it. 
I understand that i have to store TaskPtr's and that the TaskGroup
doesn't have to be shared. My problem is, AbstractGroupableItem, which derives Task, was created 
that TaskGroups and Tasks can be handled the same way. So the Task remains guarded i made the
AbstractGroupableItem guarded too. Hence the TaskGroup automatically was guarded since it inherits
AbstractGroupableItem too.
I'm not comletely sure but i believe you told me that i shouldn't make the AbstractGroupableItem guarded.
If i would do that, i would pass AbstractGroupableItem pointers to GroupingStrategy which should store all items.
This would result in a list of unguarded Task pointers and thats obviously not what we want.

Would you just not derive the Task from AbstractGroupableItem but rather let the AbstractGroupableItem hold TaskPtr?
If this is the case one would have to do abstractGroupableItem->taskPtr()->someTaskFuncion(); 
which wouldn't be nice as i think.

Or would you let the AbstractGroupableItem hold a guarded copy of itself? So the AbstractGroupableItem holds a TaskPtr
of its own? Don't know if this would work but it seems strange to me.

Regards

_________________________________________________________________
Sie haben nie Platz in Ihrer Inbox? Mit Windows Live Hotmail haben Sie jetzt 5GB Speicherplatz - gratis! Holen Sie sich hier Ihren neuen  Windows Live Hotmail Account!
http://get.live.com/mail/overview
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/panel-devel/attachments/20080708/e6eac64f/attachment.html 


More information about the Panel-devel mailing list