Commit 877641c2 authored by Laurent Montel's avatar Laurent Montel 😁

Move variable in private class

parent 90e28533
......@@ -18,23 +18,36 @@
#include "grantleeheaderstyle.h"
#include "header/grantleeheaderformatter.h"
#include "header/headerstrategy.h"
#include "grantleetheme/grantleetheme.h"
#include <kmime/kmime_message.h>
using namespace MessageViewer;
namespace MessageViewer
class MessageViewer::GrantleeHeaderStylePrivate
{
public:
GrantleeHeaderStylePrivate()
: mGrantleeFormatter(Q_NULLPTR)
{
mGrantleeFormatter = new GrantleeHeaderFormatter;
}
~GrantleeHeaderStylePrivate()
{
delete mGrantleeFormatter;
}
GrantleeHeaderFormatter *mGrantleeFormatter;
};
GrantleeHeaderStyle::GrantleeHeaderStyle()
: HeaderStyle()
: HeaderStyle(),
d(new MessageViewer::GrantleeHeaderStylePrivate)
{
mGrantleeFormatter = new GrantleeHeaderFormatter;
}
GrantleeHeaderStyle::~GrantleeHeaderStyle()
{
delete mGrantleeFormatter;
delete d;
}
const char *GrantleeHeaderStyle::name() const
......@@ -47,12 +60,10 @@ QString GrantleeHeaderStyle::format(KMime::Message *message) const
if (!message) {
return QString();
}
return mGrantleeFormatter->toHtml(theme(), isPrinting(), this, message);
return d->mGrantleeFormatter->toHtml(theme(), isPrinting(), this, message);
}
bool GrantleeHeaderStyle::hasAttachmentQuickList() const
{
return true;
}
}
......@@ -23,7 +23,7 @@
namespace MessageViewer
{
class GrantleeHeaderFormatter;
//Temporary.
class GrantleeHeaderStylePrivate;
class MESSAGEVIEWER_EXPORT GrantleeHeaderStyle : public HeaderStyle
{
public:
......@@ -38,7 +38,7 @@ public:
bool hasAttachmentQuickList() const Q_DECL_OVERRIDE;
private:
GrantleeHeaderFormatter *mGrantleeFormatter;
GrantleeHeaderStylePrivate *const d;
};
}
#endif // GRANTLEEHEADERSTYLE_H
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