From e1c1964093e2b8d9ffb329f7a49177793037f0da Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Sun, 1 Nov 2009 15:08:01 +0000 Subject: [PATCH] Start to port port it (but for the moment we can't see text yet) svn path=/branches/work/akonadi-ports/kdepim/; revision=1043438 --- newcomposerwin.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/newcomposerwin.cpp b/newcomposerwin.cpp index 25da2e3e3..878479c1f 100644 --- a/newcomposerwin.cpp +++ b/newcomposerwin.cpp @@ -144,7 +144,7 @@ using KMail::TemplateParser; #include #include - +#include // MOC #include "newcomposerwin.moc" @@ -1710,6 +1710,14 @@ void KMComposeWin::setMsg( KMime::Message *newMsg, bool mayAutoSign, // TODO fix crash in kmime // collectImages( mMsg->mainBodyPart( "text/html" ) ); // when using html, check for embedded images + KMime::Content *msgContent = new KMime::Content; + msgContent->setContent( mMsg->encodedContent() ); + MessageViewer::EmptySource emptySource; + MessageViewer::ObjectTreeParser otp( &emptySource );//All default are ok + otp.parseObjectTree( msgContent ); + qDebug()<<" opt.textualContent :"<setText( otp.textualContent() ); + #if 0 //TODO port to kmime partNode *root = partNode::fromMessage( mMsg ); @@ -1890,9 +1898,8 @@ void KMComposeWin::setMsg( KMime::Message *newMsg, bool mayAutoSign, // the template parser. if ( mMsg->getCursorPos() > 0 ) mEditor->setCursorPositionFromStart( mMsg->getCursorPos() ); - - setModified( isModified ); #endif + setModified( isModified ); // honor "keep reply in this folder" setting even when the identity is changed later on #if 0 //Port to akonadi