diff --git a/mimetreeparser/src/objecttreeparser.h b/mimetreeparser/src/objecttreeparser.h --- a/mimetreeparser/src/objecttreeparser.h +++ b/mimetreeparser/src/objecttreeparser.h @@ -270,9 +270,9 @@ 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 @@ bool showOnlyOneMimePart() const; void setShowOnlyOneMimePart(bool show); - const AttachmentStrategy *attachmentStrategy() const; - HtmlWriter *htmlWriter() const; NodeHelper *nodeHelper() const; diff --git a/mimetreeparser/src/objecttreeparser.cpp b/mimetreeparser/src/objecttreeparser.cpp --- a/mimetreeparser/src/objecttreeparser.cpp +++ b/mimetreeparser/src/objecttreeparser.cpp @@ -60,38 +60,33 @@ 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) , mTopLevelContent(topLevelParser->mTopLevelContent) , 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) , mTopLevelContent(nullptr) , mShowOnlyOneMimePart(showOnlyOneMimePart) , mHasPendingAsyncJobs(false) , mAllowAsync(false) - , mAttachmentStrategy(strategy) { init(); } void ObjectTreeParser::init() { Q_ASSERT(mSource); - if (!attachmentStrategy()) { - mAttachmentStrategy = mSource->attachmentStrategy(); - } if (!mNodeHelper) { mNodeHelper = new NodeHelper(); @@ -110,7 +105,6 @@ , mShowOnlyOneMimePart(other.showOnlyOneMimePart()) , mHasPendingAsyncJobs(other.hasPendingAsyncJobs()) , mAllowAsync(other.allowAsync()) - , mAttachmentStrategy(other.attachmentStrategy()) , mDeleteNodeHelper(false) { } @@ -362,11 +356,6 @@ mShowOnlyOneMimePart = show; } -const AttachmentStrategy *ObjectTreeParser::attachmentStrategy() const -{ - return mAttachmentStrategy; -} - HtmlWriter *ObjectTreeParser::htmlWriter() const { if (mHtmlWriter) {