Commit 24192bcb authored by Sandro Knauß's avatar Sandro Knauß

delete BodyPart::defaultDisplay, that is not used from any plugin.

Test Plan: run tests of messagelib && kdepim-addons

Reviewers: vkrause

Subscribers: #kde_pim

Tags: #kde_pim

Differential Revision: https://phabricator.kde.org/D8571
parent 59a75d7b
......@@ -73,14 +73,6 @@ public:
*/
virtual BodyPartMemento *memento() const = 0;
enum Display {
None, AsIcon, Inline
};
/**
@return whether this body part should be displayed iconic or inline
*/
virtual Display defaultDisplay() const = 0;
/** Returns the KMime::Content node represented here. Makes most of the above obsolete
and probably should be used in the interfaces in the first place.
*/
......
......@@ -198,10 +198,6 @@ MessagePartPtr ObjectTreeParser::processType(KMime::Content *node, ProcessResult
Q_ASSERT(!formatters.empty());
for (auto formatter : formatters) {
PartNodeBodyPart part(this, &processResult, mTopLevelContent, node, mNodeHelper);
// Set the default display strategy for this body part relying on the
// identity of Interface::BodyPart::Display and AttachmentStrategy::Display
part.setDefaultDisplay((Interface::BodyPart::Display)attachmentStrategy()->defaultDisplay(node));
mNodeHelper->setNodeDisplayedEmbedded(node, true);
const MessagePart::Ptr result = formatter->process(part);
......
......@@ -43,7 +43,6 @@ PartNodeBodyPart::PartNodeBodyPart(ObjectTreeParser *otp, ProcessResult *result,
: Interface::BodyPart()
, mTopLevelContent(topLevelContent)
, mContent(content)
, mDefaultDisplay(Interface::BodyPart::None)
, mNodeHelper(nodeHelper)
, mObjectTreeParser(otp)
, mProcessResult(result)
......@@ -58,15 +57,7 @@ Interface::BodyPartMemento *PartNodeBodyPart::memento() const
return mNodeHelper->bodyPartMemento(mContent, "__plugin__");
}
Interface::BodyPart::Display PartNodeBodyPart::defaultDisplay() const
{
return mDefaultDisplay;
}
void PartNodeBodyPart::setDefaultDisplay(Interface::BodyPart::Display d)
{
mDefaultDisplay = d;
}
Interface::ObjectTreeSource *PartNodeBodyPart::source() const
{
......
......@@ -55,8 +55,6 @@ public:
explicit PartNodeBodyPart(ObjectTreeParser *otp, ProcessResult *result, KMime::Content *topLevelContent, KMime::Content *content, NodeHelper *nodeHelper);
Interface::BodyPartMemento *memento() const override;
BodyPart::Display defaultDisplay() const override;
void setDefaultDisplay(BodyPart::Display);
KMime::Content *content() const override
{
return mContent;
......@@ -86,7 +84,6 @@ public:
private:
KMime::Content *mTopLevelContent = nullptr;
KMime::Content *mContent = nullptr;
BodyPart::Display mDefaultDisplay;
NodeHelper *mNodeHelper = nullptr;
ObjectTreeParser *mObjectTreeParser = nullptr;
ProcessResult *mProcessResult = nullptr;
......
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