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

Nate Graham <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected],
                   |                            |[email protected],
                   |                            |[email protected],
                   |                            |[email protected]

--- Comment #4 from Nate Graham <[email protected]> ---
Debugged this a bit. When it happens, we're in AppMenuApplet::createMenu(),
here:

if (auto *menuAction = m_model->data(QModelIndex(),
AppMenuModel::ActionRole).value<QAction *>()) {
            menu = menuAction->menu();
        }

The if statement is evaluating to false, and there's no else block to handle
the result more nicely, so the whole function returns null and the menu doesn't
open.

This code is fairly complex so I'm CCing the last few people who touched this
widget.

It does occur to me that we should never have codepaths in functions intended
to trigger UI changes that return early or return null; the result is broken
UIs. At the minimum they should bubble up an error message, or ideally
refactored to make failure impossible.

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

Reply via email to