Review Request: Support drag and drop file transfer
Dominik Cermak
d.cermak at arcor.de
Fri Dec 23 17:00:47 UTC 2011
> On Dec. 23, 2011, 3:58 p.m., David Edmundson wrote:
> > contact-list-widget.cpp, line 652
> > <http://git.reviewboard.kde.org/r/103520/diff/1/?file=44645#file44645line652>
> >
> > Important!
> >
> > I think you need to check which model we're showing at the time of the drop.
> >
> > If you're in the accounts model instead of the groups model this will just break. You'll be constantly adding contacts to group "".
I yor're in the accounts model you won't get until here...
because in dragMoveEvent I only accept if index.data(AccountsModel::ItemRole).canConvert<GroupsModelItem*>() is true.
If you're not in groups model this will never be true and Qt won't let you drop the item.
> On Dec. 23, 2011, 3:58 p.m., David Edmundson wrote:
> > contact-list-widget.cpp, line 683
> > <http://git.reviewboard.kde.org/r/103520/diff/1/?file=44645#file44645line683>
> >
> > See the comment above about checking which model we're showing.
> >
> >
> > if (d->sourceModel() == d->groupsModel) {
> > event->accept()
> > }
> >
> >
Same as above.
- Dominik
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103520/#review9206
-----------------------------------------------------------
On Dec. 23, 2011, 3:02 p.m., Dominik Cermak wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/103520/
> -----------------------------------------------------------
>
> (Updated Dec. 23, 2011, 3:02 p.m.)
>
>
> Review request for Telepathy.
>
>
> Description
> -------
>
> Adds support for drag and drop file transfer.
> Before the model handled the drag and drop of contacts between groups,
> but with reimplementing the drag*Event methods this stopped working so I moved the logic in the view.
> (I will later clean up the model, I'm sure now there is unused code.)
>
>
> This addresses bug 288560.
> http://bugs.kde.org/show_bug.cgi?id=288560
>
>
> Diffs
> -----
>
> contact-list-widget.h 85cac2a3912b127589757d95a32c64fa40444979
> contact-list-widget.cpp 3d4362442eb37577fcf067b1bd24daa80222b196
>
> Diff: http://git.reviewboard.kde.org/r/103520/diff/diff
>
>
> Testing
> -------
>
> Drag and dropping contacts to groups works.
> Dropping one or more local file(s) over a contact starts the filetransfer(s).
>
>
> Thanks,
>
> Dominik Cermak
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-telepathy/attachments/20111223/5f5f5281/attachment-0001.html>
More information about the KDE-Telepathy
mailing list