Commit ea14bb92 authored by Laurent Montel's avatar Laurent Montel 😁

Fix Bug 420766 - Envelope From is empty on outgoing mails

BUG: 420766
Revert support for big email (for the moment it creates too many
bug in encoding)
parent 84531f83
......@@ -55,7 +55,7 @@ void WebEnginePartHtmlWriter::begin()
MessageViewer::WebEngineEmbedPart::self()->clear();
mState = Begun;
}
//#define LOAD_BIG_EMAIL 1
void WebEnginePartHtmlWriter::end()
{
BufferedHtmlWriter::end();
......@@ -66,9 +66,7 @@ void WebEnginePartHtmlWriter::end()
insertExtraHead();
mExtraHead.clear();
}
// see QWebEnginePage::setHtml()
//mHtmlView->setContent(data(), QStringLiteral("text/html;charset=UTF-8"), QUrl(QStringLiteral("file:///")));
#ifdef LOAD_BIG_EMAIL
mTempFile = new QTemporaryFile(QDir::tempPath() + QLatin1String("/messageviewer_XXXXXX")+ QLatin1String(".html"));
mTempFile->open();
QTextStream stream(mTempFile);
......@@ -76,12 +74,15 @@ void WebEnginePartHtmlWriter::end()
const QByteArray codecValue = Util::htmlCodec(data(), codec());
stream.setCodec(codecValue.constData());
stream << data();
//Bug 387061
mHtmlView->load(QUrl::fromLocalFile(mTempFile->fileName()));
//qDebug() << " tempFile.fileName()" << mTempFile->fileName();
mHtmlView->show();
mTempFile->close();
#else
mHtmlView->setContent(data(), QStringLiteral("text/html;charset=UTF-8"), QUrl(QStringLiteral("file:///")));
mHtmlView->show();
#endif
clear();
mHtmlView->setUpdatesEnabled(true);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment