Set main window as parent of stand-alone popup menus

Authored by elvisangelaccio on May 31 2017, 9:40 AM.

Description

Set main window as parent of stand-alone popup menus

Stand-alone popup menus are <Menu> elements that are children of the
top-level <gui> element. Their initial parent is nullptr, but if we are
inside a QMainWindow we can use that as the parent. This ensures proper
placement of the menus on wayland (where parents are required in order to
have a transient parent window).

We also drop an old comment which claims popup menus should not have
a parent.

Reviewers: dfaure

Differential Revision: https://phabricator.kde.org/D6045

Details