From 205dd7b99d97765446a216628f98468d048baab4 Mon Sep 17 00:00:00 2001 From: Edwin Schepers Date: Thu, 12 Jan 2006 19:30:43 +0000 Subject: [PATCH] The QTimer initializes spelling after the html message is displayed. This way, all formatting is undone. Spelling is already initiated in the constructor of KMComposeWin, so no harm is done deleting the QTimer. BUG:106968 svn path=/branches/KDE/3.5/kdepim/; revision=497436 --- kmcomposewin.cpp | 5 +++-- kmedit.cpp | 2 -- partNode.cpp | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/kmcomposewin.cpp b/kmcomposewin.cpp index 104bfbc80..9d7f4bc41 100644 --- a/kmcomposewin.cpp +++ b/kmcomposewin.cpp @@ -1814,9 +1814,10 @@ void KMComposeWin::setMsg(KMMessage* newMsg, bool mayAutoSign, if ( partNode * p = n->parentNode() ) if ( p->hasType( DwMime::kTypeMultipart ) && p->hasSubType( DwMime::kSubtypeAlternative ) ) - if ( mMsg->headerField( "X-KMail-Markup" ) == "true" ) + if ( mMsg->headerField( "X-KMail-Markup" ) == "true" ) { toggleMarkup( true ); - + mEditor->setText(n->encodedBody() ); + } /* Handle the special case of non-mime mails */ if ( mMsg->numBodyParts() == 0 && otp.textualContent().isEmpty() ) { mCharset=mMsg->charset(); diff --git a/kmedit.cpp b/kmedit.cpp index 8b03959c1..2431e6c28 100644 --- a/kmedit.cpp +++ b/kmedit.cpp @@ -218,8 +218,6 @@ KMEdit::KMEdit(QWidget *parent, KMComposeWin* composer, installEventFilter(this); KCursor::setAutoHideCursor( this, true, true ); setOverwriteEnabled( true ); - - QTimer::singleShot( 0, this, SLOT( initializeAutoSpellChecking() ) ); } diff --git a/partNode.cpp b/partNode.cpp index cee79b188..38d6b7d84 100644 --- a/partNode.cpp +++ b/partNode.cpp @@ -179,7 +179,7 @@ const QCString & partNode::encodedBody() { return mEncodedBody; if ( mDwPart ) - mEncodedBody = mDwPart->AsString().c_str(); + mEncodedBody = mDwPart->Body().AsString().c_str(); else mEncodedBody = 0; mEncodedOk = true;