D14633: Fix drag'n'drop behaviour in ProjectTreeView plugin

Milian Wolff noreply at phabricator.kde.org
Sun Jan 27 19:31:47 GMT 2019


mwolff added a comment.


  sorry for the long delay. personally, I like what I'm seeing in the video, could you cleanup the patch a little please? and does `ensureVisible` help maybe?

INLINE COMMENTS

> projecttreeview.cpp:57
>  
> +
>  using namespace KDevelop;

undo this hunk

> projecttreeview.cpp:177
> +        // try to return the expanded folder back to the mouse cursor if the folder has shifted
> +        int curTargetPos = visualRect(expandTargetItem).top();
> +        int targtPosChange = curTargetPos - prevTargetPos;

could you maybe instead just call `ensureVisible` on the index below the cursor before you collapse the previously opened folders?

> projecttreeview.h:80
> +        // drag'n'drop implementation
> +        QBasicTimer expandTimer;
> +        KDevelop::ProjectFolderItem *curExpandTarget;

add `m_` prefixes to all members

> projecttreeview.h:81
> +        QBasicTimer expandTimer;
> +        KDevelop::ProjectFolderItem *curExpandTarget;
> +        std::stack<KDevelop::ProjectFolderItem*> expandStack;

don't abbreviate please

REPOSITORY
  R32 KDevelop

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

To: vkorneev, #kdevelop
Cc: mwolff, kossebau, croick, kdevelop-devel, glebaccon, hase, antismap, iodelay, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20190127/517ef326/attachment.html>


More information about the KDevelop-devel mailing list