D26043: Add edit mode menu item to desktop widget context menu
David Edmundson
noreply at phabricator.kde.org
Fri Jan 10 11:53:52 GMT 2020
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200110/9716630e/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list