Details
-
Suggestion
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.15.0
-
None
-
any
Description
I wonder why there is a
QList<QAction *> QWidget::actions() const
but no
const QList<QAction *>& QWidget::actionsRef() const
while `QWidget::actions() ` implementation is just a:
QList<QAction*> QWidget::actions() const { Q_D(const QWidget); return d->actions; }
Static analyzers are complaining
warning: Don't call QList::operator[]() on temporary [-Wclazy-detaching-temporary]
for
QAction* action = m_menu.actions()[i];
and it's annoying.