D8519: do not make the context menu a Window; do not force raise a window
David Edmundson
noreply at phabricator.kde.org
Fri Oct 27 12:39:13 UTC 2017
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20171027/290b0a4e/attachment.html>
More information about the Kde-frameworks-devel
mailing list