https://bugs.kde.org/show_bug.cgi?id=508648
Felix Ernst <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Latest Commit| |https://invent.kde.org/syst | |em/dolphin/-/commit/fb4a4eb | |1884da2192bf17ab4f92f2ff01f | |531044 Status|ASSIGNED |RESOLVED --- Comment #2 from Felix Ernst <[email protected]> --- Git commit fb4a4eb1884da2192bf17ab4f92f2ff01f531044 by Felix Ernst. Committed on 07/09/2025 at 20:47. Pushed by felixernst into branch 'master'. Fix crash between selection mode and folder icon chooser Opening selection mode twice with a single folder selected causes a crash. SetFolderIconItemAction expects its widget to be destroyed but the SelectionMode::BottomBar code path keeps it alive, so the second call to QWidgetAction::createWidget() of the folder icon chooser crashes because the previously created widget still has a parent. This small check fixes the crash. Contrarily, the regular context menu does destroy the actions on hide, so no crash happens there. An alternative fix to what was implemented in this commit could look at the lifetime handling of the SelectionMode::BottomBar implementation. Its BottomBarContentsContainer is never destroyed, BottomBarContentsContainer::contextActionsFor does not set lifetimes on contextActions, or destroys its actions on hide. However, fixing this here in QWidgetAction::createWidget() also makes sense because the related QWidgetAction::requestWidget() method transfers ownership to the caller. It's not part of this API to expect the caller to delete the widget immediately. On the contrary QWidgetAction::requestWidget(QWidget *parent) is typically expected to be callable e.g. by toolbars as well where the action will persist indefinitely. M +3 -1 src/itemactions/setfoldericonitemaction.cpp https://invent.kde.org/system/dolphin/-/commit/fb4a4eb1884da2192bf17ab4f92f2ff01f531044 -- You are receiving this mail because: You are watching all bug changes.
