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

Add source to BodyPart, so that plugins can reach the source of ObjectTreeParser

parent 0ea79a3c
......@@ -47,6 +47,8 @@ namespace MessageViewer
class NodeHelper;
class ObjectTreeParser;
class ProcessResult;
class ObjectTreeSourceIf;
namespace Interface
{
......@@ -195,6 +197,7 @@ public:
* For making it easier to refactor, add objectTreeParser
*/
virtual MessageViewer::ObjectTreeParser *objectTreeParser() const = 0;
virtual MessageViewer::ObjectTreeSourceIf *source() const = 0;
virtual MessageViewer::ProcessResult *processResult() const = 0;
};
......
......@@ -463,6 +463,7 @@ private:
bool mDeleteNodeHelper;
bool mPrinting;
friend class PartNodeBodyPart;
friend class MessagePart;
friend class CryptoMessagePart;
friend class CertMessagePart;
......
......@@ -118,3 +118,8 @@ void PartNodeBodyPart::setDefaultDisplay(Interface::BodyPart::Display d)
{
mDefaultDisplay = d;
}
ObjectTreeSourceIf *PartNodeBodyPart::source() const
{
return mObjectTreeParser->mSource;
}
\ No newline at end of file
......@@ -97,6 +97,7 @@ public:
return mProcessResult;
}
ObjectTreeSourceIf *source() const Q_DECL_OVERRIDE;
private:
KMime::Content *mTopLevelContent;
KMime::Content *mContent;
......
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