davidedmundson added inline comments.

INLINE COMMENTS

> qmenuitem.cpp:29
>      setAction(new QAction(this));
> +    m_hasExplicitAction = false;
>  }

Another approach I've seen done before is:

if (action->parent() == this) we delete it, else it's the client's problem.

IMHO cleaner, but up to you.

> qmenuitem.cpp:46
> +            if (a) {
> +                m_hasExplicitAction = true;
> +                delete m_action;

you need a setVisible(true);

otherwise setAction(null);   setAction(something) will still be hidden.

REPOSITORY
  R242 Plasma Framework (Library)

REVISION DETAIL
  https://phabricator.kde.org/D6608

To: broulik, #plasma
Cc: davidedmundson, plasma-devel, #frameworks, ZrenBot, progwolff, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart, lukas

Reply via email to