D28800: Always create actioncollection
Friedrich W. H. Kossebau
noreply at phabricator.kde.org
Mon May 4 17:55:17 BST 2020
kossebau added inline comments.
INLINE COMMENTS
> kbookmarkmenu.cpp:69
> {
> m_actionCollection = actionCollection;
> }
This resetting of m_actionCollection in the constructor taking an actionCollection still results in issues, as this KBookmarkMenu constructor taking an actionCollection calls the other constructors not taking an actioncollection, but only resets the m_actionCollection afterwards.
As a result the addActions() call in the other constructor will operate on an actionCollection object which is then hidden here again. And also the actionCollection passed will not have any actions added.
So any code which tries to access actions unconditionally from the actionCollection using the action id, like "add_bookmark", will get a nullptr and then go boom.
Like happens for Konsole which got built still using the old constructor taking a actionCollection, see https://bugs.kde.org/show_bug.cgi?id=420820
REPOSITORY
R294 KBookmarks
REVISION DETAIL
https://phabricator.kde.org/D28800
To: nicolasfella, #frameworks, dfaure, stefanocrocco
Cc: kossebau, kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200504/0cd0e929/attachment.html>
More information about the Kde-frameworks-devel
mailing list