┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/itemactions/setfoldericonitemaction.cpp
AgeCommit message (Collapse)Author
2026-01-22clang-tidy: avoid copy, use const referencesMéven Car
2025-09-07Fix crash between selection mode and folder icon chooserFelix Ernst
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. BUG: 508648
2025-06-27setfoldericonitemaction: Fix a typoMéven Car
2025-06-09Add a SetFolderIcon ItemAction pluginMéven Car
To allow to change folder icon from the context menu. CCBUG: 467221