Bug 237174

Summary: Attachment actions for encapsulated message in seperate viewer don't work
Product: [Applications] kdepim Reporter: Thomas McGuire <mcguire>
Component: messageviewerAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: amantia, unnamedrambler
Priority: NOR Keywords: akonadi-ports-regression
Version: unspecified   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:
Bug Depends on:    
Bug Blocks: 223438    

Description Thomas McGuire 2010-05-10 23:28:03 UTC
1) Open an encapsulated message with an attachment in the seperate viewer, as described in bug 236725
2) Right-click on the attachment in the viewer. Nothing happens.
Comment 1 Casey Link 2010-05-26 04:09:43 UTC
reproducible, gonna check it out
Comment 2 Casey Link 2010-05-26 04:46:32 UTC
its not just the context menu that doesn't work.. none of the actions work (left click, and shift click)
Comment 3 Casey Link 2010-05-26 20:07:40 UTC
The call chain goes something like this:

AttachmentURLHandler::handleContextMenuRequest()  -> AttachmentURLHandler::nodeForUrl()  ->  MessageViewer::ViewerPrivate::nodeForUrl()    ->   KMime::Content::content()


The content() call is returning 0.
I hit a wall here.. I'm not familiar with  KMime::Content and MessageViewer's tree structure.

An observation: when you attempt an action in the non-separate viewer the same url is passed as when you attempt the action in the separate viewer. Like I said, I don't know how this tree structure works.. but that doesn't seem right to me.
Comment 4 Casey Link 2010-05-28 00:30:01 UTC
SVN commit 1131282 by link:

the viewer/urlhandlermanager expects that the message (mMessage) it is
passed is the root when doing index calculation  in urls. Simply passing
the result of bodyAsMessage() does not cut it as the resulting pointer
is a child in its tree. So, we copy the content tree making the
encapsulated message the root node. props to thomas for figuring this
out.

BUG: 237174

 M  +7 -2      viewer_p.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1131282