[Kde-pim] Re: Review Request: Prevent the editing of an attachment when it is an encsulated message

George Metaxas gmetal31 at gmail.com
Tue Jan 4 10:46:25 GMT 2011



> On 2011-01-04 01:02:39, Thomas McGuire wrote:
> > kmail/attachmentcontroller.cpp, line 173
> > <http://git.reviewboard.kde.org/r/100288/diff/3/?file=6008#file6008line173>
> >
> >     Why is the QModelIndex as parameter needed here?
> >     I thought you can get the selected attachment with selectedParts.first(), like AttachmentControllerBase::Private::editSelectedAttachment() does, can't you?
> >     
> >     Other than that, a little style thing: Put the opening brace in its own line, but only for function definitions here. For other opening braces, like with ifs, they should be in the same line, as you did correctly.

In this case, this QModelIndex is sent by the doubleClicked signal of the QTreeView. The QTreeView would be more appropriate to calculate the appropriate index clicked. I prefer not to use something like selectedParts.first(), as I want to avoid the situation where the user double clicks on the tree view, but not on an actual item, and I end up opening showing the first selected attachment.


- George


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


On 2011-01-03 15:06:29, George Metaxas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/100288/
> -----------------------------------------------------------
> 
> (Updated 2011-01-03 15:06:29)
> 
> 
> Review request for KDEPIM.
> 
> 
> Summary
> -------
> 
> When the user attempts to forward a message that contains an encapsulated message, they are shown the attachment and can edit it, by double clicking on it. However, in this case, it doesn't make sense to edit the attachment. If the user is allowed to edit the attachment, they get an error in a message box. This patch detects if the user has double clicked on an encapsulated message and proceeds to open the attachment for viewing only.
> 
> 
> This addresses bug 232782.
>     http://bugs.kde.org/show_bug.cgi?id=232782
> 
> 
> Diffs
> -----
> 
>   kmail/attachmentcontroller.h a634ce9 
>   kmail/attachmentcontroller.cpp 11157d0 
>   messagecomposer/attachmentcontrollerbase.cpp 1361426 
> 
> Diff: http://git.reviewboard.kde.org/r/100288/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> George
> 
>

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list