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 035cbe26 authored by Sandro Knauß's avatar Sandro Knauß

Remove ObjectTreeParser::attachmentStrategy

Summary: now handled directly inside MessageViwer

Test Plan: run tests

Reviewers: vkrause

Subscribers: #kde_pim

Tags: #kde_pim

Differential Revision: https://phabricator.kde.org/D8572
parent cd7c19a7
......@@ -60,7 +60,7 @@
using namespace MimeTreeParser;
ObjectTreeParser::ObjectTreeParser(const ObjectTreeParser *topLevelParser, bool showOnlyOneMimePart, const AttachmentStrategy *strategy)
ObjectTreeParser::ObjectTreeParser(const ObjectTreeParser *topLevelParser, bool showOnlyOneMimePart)
: mSource(topLevelParser->mSource)
, mNodeHelper(topLevelParser->mNodeHelper)
, mHtmlWriter(topLevelParser->mHtmlWriter)
......@@ -68,12 +68,11 @@ ObjectTreeParser::ObjectTreeParser(const ObjectTreeParser *topLevelParser, bool
, mShowOnlyOneMimePart(showOnlyOneMimePart)
, mHasPendingAsyncJobs(false)
, mAllowAsync(topLevelParser->mAllowAsync)
, mAttachmentStrategy(strategy)
{
init();
}
ObjectTreeParser::ObjectTreeParser(Interface::ObjectTreeSource *source, MimeTreeParser::NodeHelper *nodeHelper, bool showOnlyOneMimePart, const AttachmentStrategy *strategy)
ObjectTreeParser::ObjectTreeParser(Interface::ObjectTreeSource *source, MimeTreeParser::NodeHelper *nodeHelper, bool showOnlyOneMimePart)
: mSource(source)
, mNodeHelper(nodeHelper)
, mHtmlWriter(nullptr)
......@@ -81,7 +80,6 @@ ObjectTreeParser::ObjectTreeParser(Interface::ObjectTreeSource *source, MimeTree
, mShowOnlyOneMimePart(showOnlyOneMimePart)
, mHasPendingAsyncJobs(false)
, mAllowAsync(false)
, mAttachmentStrategy(strategy)
{
init();
}
......@@ -89,9 +87,6 @@ ObjectTreeParser::ObjectTreeParser(Interface::ObjectTreeSource *source, MimeTree
void ObjectTreeParser::init()
{
Q_ASSERT(mSource);
if (!attachmentStrategy()) {
mAttachmentStrategy = mSource->attachmentStrategy();
}
if (!mNodeHelper) {
mNodeHelper = new NodeHelper();
......@@ -110,7 +105,6 @@ ObjectTreeParser::ObjectTreeParser(const ObjectTreeParser &other)
, mShowOnlyOneMimePart(other.showOnlyOneMimePart())
, mHasPendingAsyncJobs(other.hasPendingAsyncJobs())
, mAllowAsync(other.allowAsync())
, mAttachmentStrategy(other.attachmentStrategy())
, mDeleteNodeHelper(false)
{
}
......@@ -362,11 +356,6 @@ void ObjectTreeParser::setShowOnlyOneMimePart(bool show)
mShowOnlyOneMimePart = show;
}
const AttachmentStrategy *ObjectTreeParser::attachmentStrategy() const
{
return mAttachmentStrategy;
}
HtmlWriter *ObjectTreeParser::htmlWriter() const
{
if (mHtmlWriter) {
......
......@@ -270,9 +270,9 @@ class MIMETREEPARSER_EXPORT ObjectTreeParser
ObjectTreeParser(const ObjectTreeParser &other);
public:
explicit ObjectTreeParser(Interface::ObjectTreeSource *source, NodeHelper *nodeHelper = nullptr, bool showOneMimePart = false, const AttachmentStrategy *attachmentStrategy = nullptr);
explicit ObjectTreeParser(Interface::ObjectTreeSource *source, NodeHelper *nodeHelper = nullptr, bool showOneMimePart = false);
explicit ObjectTreeParser(const ObjectTreeParser *topLevelParser, bool showOneMimePart = false, const AttachmentStrategy *attachmentStrategy = nullptr);
explicit ObjectTreeParser(const ObjectTreeParser *topLevelParser, bool showOneMimePart = false);
virtual ~ObjectTreeParser();
void setAllowAsync(bool allow);
......@@ -307,8 +307,6 @@ public:
bool showOnlyOneMimePart() const;
void setShowOnlyOneMimePart(bool show);
const AttachmentStrategy *attachmentStrategy() const;
HtmlWriter *htmlWriter() const;
NodeHelper *nodeHelper() const;
......
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