Commit 6f7ede74 authored by Sandro Knauß's avatar Sandro Knauß

use functions instead of provate members

parent 54df6eef
......@@ -485,7 +485,7 @@ public:
}
if (mp->isAttachment()) {
aBlock = HTMLBlock::Ptr(new AttachmentMarkBlock(htmlWriter.data(), mp->mAttachmentNode));
aBlock = HTMLBlock::Ptr(new AttachmentMarkBlock(htmlWriter.data(), mp->attachmentNode()));
}
mp->setHtmlWriter(htmlWriter.data());
......@@ -503,10 +503,10 @@ public:
HTMLBlock::Ptr aBlock;
HTMLBlock::Ptr rBlock;
if (mp->isAttachment()) {
aBlock = HTMLBlock::Ptr(new AttachmentMarkBlock(htmlWriter.data(), mp->mAttachmentNode));
aBlock = HTMLBlock::Ptr(new AttachmentMarkBlock(htmlWriter.data(), mp->attachmentNode()));
}
if (mp->mIsInternalRoot) {
if (mp->isRoot()) {
rBlock = HTMLBlock::Ptr(new RootBlock(htmlWriter.data()));
}
......@@ -540,7 +540,7 @@ public:
{
HTMLBlock::Ptr aBlock;
if (mp->isAttachment()) {
aBlock = HTMLBlock::Ptr(new AttachmentMarkBlock(htmlWriter.data(), mp->mAttachmentNode));
aBlock = HTMLBlock::Ptr(new AttachmentMarkBlock(htmlWriter.data(), mp->attachmentNode()));
}
const auto html = t->render(&c);
htmlWriter->queue(html);
......@@ -614,7 +614,7 @@ public:
{
HTMLBlock::Ptr aBlock;
if (mp->isAttachment()) {
aBlock = HTMLBlock::Ptr(new AttachmentMarkBlock(htmlWriter.data(), mp->mAttachmentNode));
aBlock = HTMLBlock::Ptr(new AttachmentMarkBlock(htmlWriter.data(), mp->attachmentNode()));
}
const auto html = t->render(&c);
htmlWriter->queue(html);
......@@ -821,7 +821,7 @@ public:
{
HTMLBlock::Ptr aBlock;
if (mp->isAttachment()) {
aBlock = HTMLBlock::Ptr(new AttachmentMarkBlock(htmlWriter.data(), mp->mAttachmentNode));
aBlock = HTMLBlock::Ptr(new AttachmentMarkBlock(htmlWriter.data(), mp->attachmentNode()));
}
htmlWriter->queue(quotedHTML(mp->text(), false));
......@@ -866,7 +866,7 @@ public:
{
HTMLBlock::Ptr aBlock;
if (mp->isAttachment()) {
aBlock = HTMLBlock::Ptr(new AttachmentMarkBlock(htmlWriter.data(), mp->mAttachmentNode));
aBlock = HTMLBlock::Ptr(new AttachmentMarkBlock(htmlWriter.data(), mp->attachmentNode()));
}
const auto html = t->render(&c);
htmlWriter->queue(html);
......@@ -890,7 +890,7 @@ public:
auto _htmlWriter = QSharedPointer<CacheHtmlWriter>(new CacheHtmlWriter(mOldWriter));
{
HTMLBlock::Ptr rBlock;
if (mp->mIsInternalRoot) {
if (mp->isRoot()) {
rBlock = HTMLBlock::Ptr(new RootBlock(_htmlWriter.data()));
}
renderSubParts(mp, _htmlWriter);
......@@ -935,7 +935,7 @@ public:
auto _htmlWriter = QSharedPointer<CacheHtmlWriter>(new CacheHtmlWriter(mOldWriter));
{
HTMLBlock::Ptr rBlock;
if (mp->mIsInternalRoot) {
if (mp->isRoot()) {
rBlock = HTMLBlock::Ptr(new RootBlock(_htmlWriter.data()));
}
renderSubParts(mp, _htmlWriter);
......@@ -1157,7 +1157,7 @@ public:
{
HTMLBlock::Ptr aBlock;
if (mp->isAttachment()) {
aBlock = HTMLBlock::Ptr(new AttachmentMarkBlock(htmlWriter.data(), mp->mAttachmentNode));
aBlock = HTMLBlock::Ptr(new AttachmentMarkBlock(htmlWriter.data(), mp->attachmentNode()));
}
htmlWriter->queue(renderEncrypted(mp));
}
......@@ -1168,7 +1168,7 @@ public:
{
HTMLBlock::Ptr aBlock;
if (mp->isAttachment()) {
aBlock = HTMLBlock::Ptr(new AttachmentMarkBlock(htmlWriter.data(), mp->mAttachmentNode));
aBlock = HTMLBlock::Ptr(new AttachmentMarkBlock(htmlWriter.data(), mp->attachmentNode()));
}
htmlWriter->queue(renderSigned(mp));
}
......@@ -1178,7 +1178,7 @@ public:
{
HTMLBlock::Ptr aBlock;
if (mp->isAttachment()) {
aBlock = HTMLBlock::Ptr(new AttachmentMarkBlock(htmlWriter.data(), mp->mAttachmentNode));
aBlock = HTMLBlock::Ptr(new AttachmentMarkBlock(htmlWriter.data(), mp->attachmentNode()));
}
if (mp->mNode) {
......@@ -1196,7 +1196,7 @@ public:
{
HTMLBlock::Ptr aBlock;
if (mp->isAttachment()) {
aBlock = HTMLBlock::Ptr(new AttachmentMarkBlock(htmlWriter.data(), mp->mAttachmentNode));
aBlock = HTMLBlock::Ptr(new AttachmentMarkBlock(htmlWriter.data(), mp->attachmentNode()));
}
if (mp->viewHtml() && mp->mHTMLPart) {
......@@ -1238,7 +1238,7 @@ public:
{
HTMLBlock::Ptr aBlock;
if (mp->isAttachment()) {
aBlock = HTMLBlock::Ptr(new AttachmentMarkBlock(htmlWriter.data(), mp->mAttachmentNode));
aBlock = HTMLBlock::Ptr(new AttachmentMarkBlock(htmlWriter.data(), mp->attachmentNode()));
}
const auto html = t->render(&c);
htmlWriter->queue(html);
......
......@@ -589,7 +589,7 @@ bool CryptoMessagePart::okDecryptMIME(KMime::Content &data)
mMetaData.auditLog.clear();
bool bDecryptionOk = false;
bool cannotDecrypt = false;
Interface::ObjectTreeSource *source = mOtp->mSource;
Interface::ObjectTreeSource *_source = source();
NodeHelper *nodeHelper = mOtp->nodeHelper();
assert(decryptMessage());
......@@ -611,7 +611,7 @@ bool CryptoMessagePart::okDecryptMIME(KMime::Content &data)
if (mOtp->allowAsync()) {
QObject::connect(newM, &CryptoBodyPartMemento::update,
nodeHelper, &NodeHelper::update);
QObject::connect(newM, SIGNAL(update(MimeTreeParser::UpdateMode)), source->sourceObject(),
QObject::connect(newM, SIGNAL(update(MimeTreeParser::UpdateMode)), _source->sourceObject(),
SLOT(update(MimeTreeParser::UpdateMode)));
if (newM->start()) {
mMetaData.inProgress = true;
......@@ -743,7 +743,7 @@ void CryptoMessagePart::startDecryption(KMime::Content *data)
bool CryptoMessagePart::okVerify(const QByteArray &data, const QByteArray &signature)
{
NodeHelper *nodeHelper = mOtp->nodeHelper();
Interface::ObjectTreeSource *source = mOtp->mSource;
Interface::ObjectTreeSource *_source = source();
mMetaData.isSigned = false;
mMetaData.technicalProblem = (mCryptoProto == 0);
......@@ -773,7 +773,7 @@ bool CryptoMessagePart::okVerify(const QByteArray &data, const QByteArray &signa
QObject::connect(m, &CryptoBodyPartMemento::update,
nodeHelper, &NodeHelper::update);
QObject::connect(m, SIGNAL(update(MimeTreeParser::UpdateMode)),
source->sourceObject(), SLOT(update(MimeTreeParser::UpdateMode)));
_source->sourceObject(), SLOT(update(MimeTreeParser::UpdateMode)));
if (m->start()) {
mMetaData.inProgress = true;
......
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