Fixing 55832: deleted actions are not removed from the action collection
ravi at ee.eng.ohio-state.edu
Thu Mar 13 00:22:09 GMT 2003
-----BEGIN PGP SIGNED MESSAGE-----
Deleted KActions still remain are not unplugged, and can cause crashes.
However, the KAction destructor has the following to say:
// Do not call unplugAll from here, as tempting as it sounds.
// KAction is designed around the idea that you need to plug
// _and_ to unplug it "manually". Unplugging leads to an important
// slowdown when e.g. closing the window, in which case we simply
// want to destroy everything asap, not to remove actions one by one
// from the GUI.
One option would be to add a setAutoUnplug(bool) method. However, this may
(would?) lead to misuse, and we would end up getting complaints like "KDE
programs are not only slow on startup, but also slow on exit". So my personal
inclination is to leave it as it is, add documentation about this, and close
the bug. However, as the bug reporter says, this sort of violates the
principle of easy deletion of QObjects. Countering this is the fact that most
KAction objects are managed by the XMLGUI system, and deletion is not a big
problem. If no one has any strong opinions either way, I will close this bug.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the kde-core-devel