Diffusion KIO f9eb528acffc

KUrlNavigator: expose the KUrlNavigatorButton that received a drop event

Authored by elvisangelaccio on Jul 27 2017, 1:52 PM.

Description

KUrlNavigator: expose the KUrlNavigatorButton that received a drop event

Commit 1e251d2f6a does not work with KUrlNavigator drops because the
drop event is processed at the KUrlNavigatorButton level. This means
that passing a KUrlNavigator to KJobWidgets::setWindow() results in a
wrong position for KIO::drop() menus (both on Wayland and X11).

To fix this issue, the DropJob needs to be associated to the
KUrlNavigatorButton that received the drop event. This class is
not exported, so we add a getter to KUrlNavigator that exposes
the relevant KUrlNavigatorButton as QWidget (which is enough because
the DropJob just needs to call mapToGlobal() on it).

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