D6281: Prevent folders from drag and dropping onto themselves in dolphin main view

Anthony Fieroni noreply at phabricator.kde.org
Mon Jun 19 20:18:10 BST 2017


anthonyfieroni added inline comments.

INLINE COMMENTS

> kitemlistcontroller.cpp:1175
>      QMimeData* data = m_model->createMimeData(selectedItems);
> +    this->view()->setDragSource(data->urls());
> +

Don't use this, when it isn't needed.

> kitemlistview.cpp:2678
>  
> +QUrl KItemListView::dropUrl() {
> +    return m_dropUrl;

KDE code style for functions is:

  void function()
  {
  }

> draganddrophelper.cpp:46
> +        // Prevent drag and drop onto self
> +        if (mimeData->urls().contains(destUrl)) {
> +            event->ignore();

I'm not applying the patch, but i'm pretty sure this will break treeview drag'n'drop

1. Activate treeview
2. Expand a folder by clicking '>' button
3. Move folder to its parent i.e. /home/user/test/temp tp /home/user

REPOSITORY
  R318 Dolphin

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

To: emateli, #dolphin
Cc: anthonyfieroni, #konqueror, firef, andrebarros, emmanuelp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20170619/2b916d37/attachment.htm>


More information about the kfm-devel mailing list