Bug 237174 - Attachment actions for encapsulated message in seperate viewer don't work
Summary: Attachment actions for encapsulated message in seperate viewer don't work
Status: RESOLVED FIXED
Alias: None
Product: kdepim
Classification: Applications
Component: messageviewer (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: akonadi-ports-regression
Depends on:
Blocks: 223438
  Show dependency treegraph
 
Reported: 2010-05-10 23:28 UTC by Thomas McGuire
Modified: 2010-05-28 00:30 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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