D6684: Fix drop menu position with urlnavigator drops

Elvis Angelaccio noreply at phabricator.kde.org
Thu Jul 13 17:02:37 BST 2017


elvisangelaccio created this revision.
Restricted Application added a subscriber: Konqueror.

REVISION SUMMARY
  Commit https://phabricator.kde.org/R241:1e251d2f6a428fc5cc27a766c2a6d7b5e8fb2594 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.

TEST PLAN
  Drop something on the url navigator, drop menu shows up where the drop happened.

REPOSITORY
  R318 Dolphin

BRANCH
  kurlnavigator-drops (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D6684

AFFECTED FILES
  src/views/dolphinview.cpp
  src/views/draganddrophelper.h

To: elvisangelaccio, #dolphin
Cc: #konqueror
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20170713/c574cb66/attachment.htm>


More information about the kfm-devel mailing list