Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit cb3bee16 authored by Sandro Knauß's avatar Sandro Knauß

Add the MimeTree structur to debug output

parent c96bbf9e
......@@ -1122,8 +1122,24 @@ void DefaultRenderer::setCreateMessageHeader(std::function<QString(KMime::Messag
d->mCreateMessageHeader = createMessageHeader;
}
QString renderTreeHelper(const MimeTreeParser::MessagePart::Ptr &messagePart, QString indent)
{
const QString line
= QStringLiteral("%1 * %3\n").arg(indent,
QString::fromUtf8(messagePart->metaObject()->className()));
QString ret = line;
indent += QStringLiteral(" ");
foreach (const auto &subPart, messagePart->subParts()) {
ret += renderTreeHelper(subPart, indent);
}
return ret;
}
void DefaultRenderer::render(const MimeTreeParser::MessagePart::Ptr &msgPart, HtmlWriter *writer)
{
qCDebug(MESSAGEVIEWER_LOG) << "MimeTreeParser structur:";
qCDebug(MESSAGEVIEWER_LOG) << qPrintable(renderTreeHelper(msgPart, QString()));
d->mMsgPart = msgPart;
d->renderFactory(d->mMsgPart, writer);
}
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