Backport CVS commit by tilladam:

Don't hardcode the use of the network codec when opening a mail from
a file but rather use the one the mail specifies or the fallback encoding.

CCBUG: 100834

svn path=/branches/KDE_3_4_BRANCH/kdepim/; revision=399597
wilder-work
Ingo Klcker 21 years ago
parent c79a00e9ff
commit 3353ef2dc7
  1. 8
      kmcommands.cpp
  2. 4
      kmcommands.h
  3. 2
      kmmainwidget.cpp

@ -867,9 +867,11 @@ void KMSaveMsgCommand::slotSaveResult(KIO::Job *job)
//-----------------------------------------------------------------------------
KMOpenMsgCommand::KMOpenMsgCommand( QWidget *parent, const KURL & url )
KMOpenMsgCommand::KMOpenMsgCommand( QWidget *parent, const KURL & url,
const QTextCodec *codec )
: KMCommand( parent ),
mUrl( url )
mUrl( url ),
mCodec( codec )
{
setDeletesItself( true );
}
@ -958,7 +960,7 @@ void KMOpenMsgCommand::slotResult( KIO::Job *job )
KMMessage *msg = new KMMessage( dwMsg );
msg->setReadyToShow( true );
KMReaderMainWin *win = new KMReaderMainWin();
win->showMsg( kmkernel->networkCodec(), msg );
win->showMsg( mCodec, msg );
win->show();
if ( multipleMessages )
KMessageBox::information( win,

@ -331,7 +331,8 @@ class KDE_EXPORT KMOpenMsgCommand : public KMCommand
Q_OBJECT
public:
KMOpenMsgCommand( QWidget *parent, const KURL & url = KURL() );
KMOpenMsgCommand( QWidget *parent, const KURL & url = KURL(),
const QTextCodec *codec = 0 );
private:
virtual Result execute();
@ -345,6 +346,7 @@ private:
KURL mUrl;
DwString mMsgString;
KIO::TransferJob *mJob;
const QTextCodec *mCodec;
};
class KDE_EXPORT KMSaveAttachmentsCommand : public KMCommand

@ -1586,7 +1586,7 @@ void KMMainWidget::slotSaveMsg()
//-----------------------------------------------------------------------------
void KMMainWidget::slotOpenMsg()
{
KMOpenMsgCommand *openCommand = new KMOpenMsgCommand( this );
KMOpenMsgCommand *openCommand = new KMOpenMsgCommand( this, 0, mCodec );
openCommand->start();
}

Loading…
Cancel
Save