davidedmundson added inline comments.

INLINE COMMENTS

> kstatusnotifieritem.cpp:453
>      d->menu = menu;
> -    d->menu->setParent(nullptr);
> +    //d->menu->setParent(nullptr);
>  }

make setContextMenu safe against null pointers, prevents creating a dbus menu 
exporter when we don't care for it, prevents re-doing work when calling 
setLegacySystemTrayEnabled when the object is already in the desired state and 
prevents creating multiple KDBusMenuExporter objects if setContextMenu is 
called with the same menu more than once over the lifetime of the menu (which 
can actually happen with this patch).
  
  svn path=/trunk/KDE/kdelibs/; revision=1120745

--------------

(yes, it really was back in SVN)

We take ownership of the menu in this method, and it's trying to prevent 
accidental double deletions.

It's a bit quirky. If this was new code I wouldn't do it, but again we can't 
risk breaking existing stuff.

It's weird that it changes the window type...that sounds like a bug; I'll 
happily approve setting it back.

REPOSITORY
  R289 KNotifications

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

To: mkoller, davidedmundson, graesslin
Cc: #frameworks

Reply via email to