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