Review Request: Workaround Taskbar ghost entries bug

Craig Drummond craig at kde.org
Wed Oct 5 20:54:54 UTC 2011


On Wednesday 05 Oct 2011, Aaron J. Seigo wrote:
> On Wednesday, October 5, 2011 20:08:55 Craig Drummond wrote:
> > I don’t know if its related, but whilst working on IconTasks I noticed
> > that items set to be deleted via deleteLater (in
> > TaskGroupItem::itemRemoved and TaskManager::TaskItem) were not being
> > deleted until after the app (plasmoidviewer / plasma-desktop) had
> > terminated.
> 
> the only way deleteLater() will not delete is if the event loop is never
> entered. so i'm very suspicious about this claim; 

I agree, that it looks odd. But its what I saw. The attached 
deleteLaterDebug.diff shows the output I added, output.log shows what happens.
At 21:49:35 the item is marked deleteLater, I waited 8 seconds before closing 
plasmoidviewer - and you can see the item being destroyed then.

> are you sure it was the same object (e.g. same address in memory?), and not
> just a task item with, e.g., the same name?

Yes, I outputed the address of the item just to be sure. Again, see the 
output.log

> > I worked-around this by using a single-shot QTimer to call deleteLater()
> > - but this seems a little hacky to me.
> 
> can you share the patch that does this so i can see what is going on first-
> hand? thanks! :)

Attached as deleteLater-4.7.patch. I'll I've done is replace two deleteLater 
calls with a QTimer::singleShot which calls the deleteLater.

> > p.s. I also noticed a bug with AbstractTaskItem::setGeometry(). If the
> > passed in geometry is the same as the current geometry, the layout
> > animation and update-geometry timers need to be stopped. Otherwise a gap
> > can appear when a group of items is closed all at once.
> 
> patches very much welcome for these kinds of issues :)

I did intend to - but made too many changes. I'll try to create a patch 
against the standard taskbar for each change.

Craig.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deleteLater-4.7.patch
Type: text/x-patch
Size: 904 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20111005/18e09de2/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deleteLaterDebug.diff
Type: text/x-patch
Size: 1327 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20111005/18e09de2/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: output.log
Type: text/x-log
Size: 1034 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20111005/18e09de2/attachment.log>


More information about the Plasma-devel mailing list