No way to remove KAction from KActionCollection

Tobias Koenig tokoe at kde.org
Fri Nov 21 17:48:25 GMT 2003


Hi,

atm there is no way to remove a KAction object from its parent
KActionCollection without deleting it.

When calling actionCollection()->takeItem( action ) the action is only
removed from the internal QAsciiDict of KActionCollection, but the
KAction still has a valid pointer to the collection.
When the application is quit, the KAction is destroyed and tries to
unregister itsself with its m_parentCollection pointer (which is not
valid anymore), so it tries to access an invalid object.

Any idea how to solve this?
Maybe adding an additional method
  void setActionCollection( KActionCollection* )
so the m_parentCollection can set to 0 explicitely?

Ciao,
Tobias
-- 
Can a government that shoots at reporters be democratic?
Separate politics from religion and economy!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20031121/43d6f28c/attachment.sig>


More information about the kde-core-devel mailing list