D6625: Fix crash on view split action invoked from tabbar context menu
Kevin Funk
noreply at phabricator.kde.org
Tue Jul 11 11:31:17 UTC 2017
kfunk requested changes to this revision.
kfunk added inline comments.
This revision now requires changes to proceed.
INLINE COMMENTS
> container.cpp:625
>
> - QPointer<QMenu> menu = new QMenu(senderWidget);
> + QScopedPointer<QMenu> menu(new QMenu);
> + // At least for positioning on Wayland the window the menu belongs to
`QScopedPointer` indeed doesn't really make sense. This has basically the same semantics as if `QMenu` would have been created on the stack.
Idea: Let's use `KDevelop::ScopedDialog` from https://phabricator.kde.org/R33:7cda7c95d5bfa93f34c5a52df17480c248a8367c?
Let's backport that patch and use it(?)
> container.cpp:630
> + // destruct the menu object
> + // Workaround (best known for <= Qt 5.9):
> + menu->winId(); // trigger native widget already, to ensure windowHandle
Could you add the code which we can use starting with > Qt 5.9? In #ifdefs obviously...
Makes it easier to port code once we start depending on this Qt version.
REPOSITORY
R33 KDevPlatform
REVISION DETAIL
https://phabricator.kde.org/D6625
To: kossebau, #kdevelop, kfunk
Cc: kfunk, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170711/b57df215/attachment-0001.html>
More information about the KDevelop-devel
mailing list