Revision a3885b2...
Go back to digest for 14th July 2013Bug Fixes in Development Tools
Cleanup and fixup ProjectUtils to not leak and not trigger crashes.
The most important part of this patch is the change to use a dynamic
allocated QMenu which is then _not_ run synchronously via exec() but
rather allocate it on the heap and use QObject/QWidget parentship
to handle the deallocation eventually.
This also fixes the memory leak of the populator objects.
And it fixes a crash since QMenu::exec applies a nested event loop
which apparently does not work nicely together with KXMLGUI. One
could also fix that by delaying (i.e. Qt::QueuedConnection) the
handling of _all_ QMenu actions - but that won't work of course.
So yeah, I think this is the best option to handle this crash.
Maybe one should even investigate whether we can/should deprecate
the usage of QMenu::exec in our codebase...
File Changes
- project/projectutils.cpp