davidedmundson accepted this revision.
davidedmundson added inline comments.

INLINE COMMENTS

> containmentinterface.cpp:1129
> +    if (m_containment->containmentType() == 
> Plasma::Types::DesktopContainment) {
> +        
> desktopMenu->addAction(m_containment->corona()->actions()->action(QStringLiteral("edit
>  mode")));
> +    } else {

I would prefer to see:

  auto action = m_containment->corona()->actions()->action(QStringLiteral("edit 
mode"));
  if (action) {
          desktopMenu->addAction(action);
  }

As otherwise we're relying on things which aren't specific public API. It's the 
sort of thing that can easily change in an updated library release and then our 
old software starts crashing.

REPOSITORY
  R242 Plasma Framework (Library)

BRANCH
  master

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

To: GB_2, #plasma, #vdg, mart, ngraham, davidedmundson
Cc: davidedmundson, ngraham, broulik, mart, #vdg, kde-frameworks-devel, 
#plasma, LeGast00n, GB_2, michaelh, bruns

Reply via email to