Changeset View
Changeset View
Standalone View
Standalone View
messageviewer/src/messagepartthemes/default/defaultrenderer.cpp
Show First 20 Lines • Show All 860 Lines • ▼ Show 20 Line(s) | |||||
861 | { | 861 | { | ||
862 | if (!mRendererFactory) | 862 | if (!mRendererFactory) | ||
863 | return false; | 863 | return false; | ||
864 | const auto registry = mRendererFactory->typeRegistry(className); | 864 | const auto registry = mRendererFactory->typeRegistry(className); | ||
865 | if (registry.empty()) | 865 | if (registry.empty()) | ||
866 | return false; | 866 | return false; | ||
867 | 867 | | |||
868 | const auto plugin = registry.at(0); | 868 | const auto plugin = registry.at(0); | ||
869 | return plugin->render(this, msgPart, htmlWriter); | 869 | return plugin->render(msgPart, htmlWriter, this); | ||
870 | } | 870 | } | ||
871 | 871 | | |||
872 | QString DefaultRendererPrivate::renderFactory(const MessagePart::Ptr &msgPart, HtmlWriter *_htmlWriter) | 872 | QString DefaultRendererPrivate::renderFactory(const MessagePart::Ptr &msgPart, HtmlWriter *_htmlWriter) | ||
873 | { | 873 | { | ||
874 | auto htmlWriter = QSharedPointer<CacheHtmlWriter>(new CacheHtmlWriter(mOldWriter)); | 874 | auto htmlWriter = QSharedPointer<CacheHtmlWriter>(new CacheHtmlWriter(mOldWriter)); | ||
875 | const QString className = QString::fromUtf8(msgPart->metaObject()->className()); | 875 | const QString className = QString::fromUtf8(msgPart->metaObject()->className()); | ||
876 | 876 | | |||
877 | if (renderWithFactory(className, msgPart, htmlWriter.data())) | 877 | if (renderWithFactory(className, msgPart, htmlWriter.data())) | ||
▲ Show 20 Lines • Show All 65 Lines • Show Last 20 Lines |