]> cloud.milkyroute.net Git - dolphin.git/commit
Fix drop menu position with urlnavigator drops
authorElvis Angelaccio <elvis.angelaccio@kde.org>
Wed, 12 Jul 2017 08:40:15 +0000 (10:40 +0200)
committerElvis Angelaccio <elvis.angelaccio@kde.org>
Thu, 27 Jul 2017 13:49:52 +0000 (15:49 +0200)
commitc3de867622afc7e0eaf787bf371873387a6b4451
tree68ce2f48e8aad1973c35636f3f87c4c6685baae0
parentcf273cd8a90178460c29b97b115a876fbef10295
Fix drop menu position with urlnavigator drops

Commit 1e251d2f6a in kio broke drop menus when dropping on the URL
navigator (menus show up in the DolphinView rather than the URL bar).
This happens because in DolphinView::dropUrls() we set `this` as the
widget passed to KJobWidgets::setWindow() (in DragAndDropHelper::dropUrls()).

We need to replace `this` with the actual widget that received the QDropEvent
and that can mapToGlobal() the relative pos of the drop event.
Unfortunately this widget is not KUrlNavigator itself, but one of its
KUrlNavigatorButton children (private class, not exported). So
unfortunately we need a new API in KIO that exposes this child widget.

Differential Revision: https://phabricator.kde.org/D6684
src/dolphintabwidget.cpp
src/dolphinviewcontainer.cpp
src/views/dolphinview.cpp
src/views/dolphinview.h
src/views/draganddrophelper.h