D29427: [KBookmarkMenu] Assign m_actionCollection early to prevent crash
dfaure added a comment. Yep, doing it already. REPOSITORY R294 KBookmarks REVISION DETAIL https://phabricator.kde.org/D29427 To: ahmadsamir, #frameworks, dfaure, kossebau, nicolasfella Cc: rikmills, kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns
D29427: [KBookmarkMenu] Assign m_actionCollection early to prevent crash
kossebau added a comment. 5.70 wants this as appended commit, no? REPOSITORY R294 KBookmarks REVISION DETAIL https://phabricator.kde.org/D29427 To: ahmadsamir, #frameworks, dfaure, kossebau, nicolasfella Cc: rikmills, kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns
D29427: [KBookmarkMenu] Assign m_actionCollection early to prevent crash
This revision was automatically updated to reflect the committed changes. Closed by commit R294:8a282319bc9e: [KBookmarkMenu] Assign m_actionCollection early to prevent crash (authored by ahmadsamir). REPOSITORY R294 KBookmarks CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D29427?vs=81934=81950 REVISION DETAIL https://phabricator.kde.org/D29427 AFFECTED FILES src/kbookmarkmenu.cpp src/kbookmarkmenu.h To: ahmadsamir, #frameworks, dfaure, kossebau, nicolasfella Cc: rikmills, kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns
D29427: [KBookmarkMenu] Assign m_actionCollection early to prevent crash
dfaure accepted this revision. This revision is now accepted and ready to land. REPOSITORY R294 KBookmarks BRANCH l-bookmarkmenu-assign-actioncoll (branched from master) REVISION DETAIL https://phabricator.kde.org/D29427 To: ahmadsamir, #frameworks, dfaure, kossebau, nicolasfella Cc: rikmills, kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns
D29427: [KBookmarkMenu] Assign m_actionCollection early to prevent crash
ahmadsamir added a reviewer: nicolasfella. REPOSITORY R294 KBookmarks REVISION DETAIL https://phabricator.kde.org/D29427 To: ahmadsamir, #frameworks, dfaure, kossebau, nicolasfella Cc: rikmills, kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns
D29427: [KBookmarkMenu] Assign m_actionCollection early to prevent crash
ahmadsamir created this revision. ahmadsamir added reviewers: Frameworks, dfaure. Herald added a project: Frameworks. ahmadsamir requested review of this revision. REVISION SUMMARY The deprecated ctor that took a KActionCollection param called the new ctor (that doesn't take an actionCollection before) m_actionCollection was assigned. This caused the menu actions never to get added to the actionCollection as it was still nullptr. This caused crashes in applications that still use the deprecated ctor, e.g. this bug in konsole https://bugs.kde.org/show_bug.cgi?id=420820. Since we can't assign m_actionCollection in the initializer list because then the constructor delegation would follow a member initializer (info courtsey of the compiler), introduce a helper init method to reduce code duplication between the two ctor's. Thanks to Friedrich W. H. Kossebau for figuring it out https://phabricator.kde.org/D28800#663274. CCBUG: 420820 TEST PLAN make && ctest REPOSITORY R294 KBookmarks BRANCH l-bookmarkmenu-assign-actioncoll (branched from master) REVISION DETAIL https://phabricator.kde.org/D29427 AFFECTED FILES src/kbookmarkmenu.cpp src/kbookmarkmenu.h To: ahmadsamir, #frameworks, dfaure Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns