refactor ContextMenuExtension::populateMenu to get rid of adding NULL Qaction warnings from QWidget::insertAction

Review Request #129829 - Created Jan. 14, 2017 and discarded

Information
René J.V. Bertin
kdevplatform
Reviewers
kdevelop

When extensions like the debugger plugin(s) are not loaded attempts can be made to insert NULL QAction pointers into the context menu.
This patch modifies ContextMenuExtension::populateMenu() to avoid that.

Currently I filter out null pointers in a new addContextActions function, but maybe this should in fact be taken care of by ContextMenuExtension::addAction()?

Is it useful to print a warning or debug message about this kind of event, or is it in fact an accepted/able situation that is an expected outcome when plugins are not loaded?

Works as intended.

Friedrich W. H. Kossebau
René J.V. Bertin
Review request changed

Status: Discarded

Loading...