https://bugs.kde.org/show_bug.cgi?id=525162

Zühtü Eren İncekara <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|                            |https://invent.kde.org/syst
                   |                            |em/dolphin/-/commit/50ecc77
                   |                            |84964b16a5185cd76ba2bb2c86a
                   |                            |f90a78
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #2 from Zühtü Eren İncekara <[email protected]> ---
Git commit 50ecc7784964b16a5185cd76ba2bb2c86af90a78 by Zühtü Eren İncekara.
Committed on 04/09/2026 at 11:13.
Pushed by meven into branch 'master'.

setfoldericon: fix folder icon color buttons not working on Desktop

QWidgetAction::createWidget() can be called more than once per menu
(e.g. Plasma's Desktop/Folder View context menu calls it twice with
two different QMenu parents). Each call hands out a separate,
short-lived QWidget.

The visible-row QActions were created with parentWidget as their
QObject parent, which is null when the menu is built by the Desktop.
createWidget() then adopted these parentless actions into whichever
transient widget happened to call it first. Once that (discarded)
widget was destroyed, its QAction children were destroyed with it,
silently breaking the QPushButton::clicked -> QAction::triggered
connection for the buttons actually shown to the user (Qt
auto-disconnects a connection once its receiver/context object is
deleted, with no warning).

The "Other" submenu was unaffected because its actions are parented
directly to the submenu itself, which stays alive for the menu's
whole lifetime.

Fix: parent the visible-row QActions to the long-lived
ButtonsWithSubMenuWidgetAction instead, and drop the reparenting to
the transient createWidget() widget.

M  +6    -5    src/itemactions/setfoldericonitemaction.cpp

https://invent.kde.org/system/dolphin/-/commit/50ecc7784964b16a5185cd76ba2bb2c86af90a78

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to