Review Request: Support drag and drop file transfer

David Edmundson kde at davidedmundson.co.uk
Fri Dec 23 15:58:36 UTC 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103520/#review9206
-----------------------------------------------------------


Watch your braces {}. They're required.

Also there's a significant issue that needs fixing wrt to dropping contacts.

I'd also like to see the relevant code in the two models deleted. (which is a good thing)


contact-list-widget.h
<http://git.reviewboard.kde.org/r/103520/#comment7614>

    Put this in your private class.
    
    (and if this wasn't in there it should be called m_dropInidicatorRect);



contact-list-widget.cpp
<http://git.reviewboard.kde.org/r/103520/#comment7615>

    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 "".



contact-list-widget.cpp
<http://git.reviewboard.kde.org/r/103520/#comment7613>

    always use 
    
    if (foo) {
      stuff
    }
    
    with the braces {}. 
    
    Goes for a few places.



contact-list-widget.cpp
<http://git.reviewboard.kde.org/r/103520/#comment7616>

    See the comment above about checking which model we're showing.
    
      
    if (d->sourceModel() == d->groupsModel) {
        event->accept()
    }
    
    


- David Edmundson


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/800a06c1/attachment-0001.html>


More information about the KDE-Telepathy mailing list