[Bug 164653] Folderview crash at log-out

Sebastian Sauer mail at dipe.org
Sun Jun 22 13:43:45 CEST 2008


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=164653         




------- Additional Comments From mail dipe org  2008-06-22 13:43 -------
just to complete comment #2;

within folderview.cpp the line;
m_newMenu = new KNewMenu(&m_actionCollection, view(), "new_menu");
does create the m_newMenu-instance. The second argument is the QObject-parent. That means, that the m_newMenu is a child of the view() and will be deleted if the view() got deleted...

an alternate fix to those from comment #2 would be to;
- m_newMenu = new KNewMenu(&m_actionCollection, view(), "new_menu");
+ m_newMenu = new KNewMenu(&m_actionCollection, this, "new_menu");

and then we could really just remove the delete from the destructor since then the m_newMenu would be child of our folderview and deleted if the folderview got deleted. But that would also change the parentWidget (from view() to this) and looking around within the folderview.cpp shows, that operation like e.g. copy, paste, del, etc. operate on the view(). So, the QPointer-"trick" seems to be the saver (as easier to be sure no new problems got introduced) solution :)


More information about the Panel-devel mailing list