Changeset View
Changeset View
Standalone View
Standalone View
messageviewer/src/messagepartthemes/default/defaultrenderer.cpp
| Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Line(s) | |||||
| 54 | #include <grantlee/metatype.h> | 54 | #include <grantlee/metatype.h> | ||
| 55 | #include <grantlee/templateloader.h> | 55 | #include <grantlee/templateloader.h> | ||
| 56 | #include <grantlee/template.h> | 56 | #include <grantlee/template.h> | ||
| 57 | 57 | | |||
| 58 | using namespace MimeTreeParser; | 58 | using namespace MimeTreeParser; | ||
| 59 | using namespace MessageViewer; | 59 | using namespace MessageViewer; | ||
| 60 | 60 | | |||
| 61 | Q_DECLARE_METATYPE(GpgME::DecryptionResult::Recipient) | 61 | Q_DECLARE_METATYPE(GpgME::DecryptionResult::Recipient) | ||
| 62 | Q_DECLARE_METATYPE(GpgME::Key) | ||||
| 62 | Q_DECLARE_METATYPE(const QGpgME::Protocol *) | 63 | Q_DECLARE_METATYPE(const QGpgME::Protocol *) | ||
| 63 | 64 | | |||
| 64 | static const int SIG_FRAME_COL_UNDEF = 99; | 65 | static const int SIG_FRAME_COL_UNDEF = 99; | ||
| 65 | #define SIG_FRAME_COL_RED -1 | 66 | #define SIG_FRAME_COL_RED -1 | ||
| 66 | #define SIG_FRAME_COL_YELLOW 0 | 67 | #define SIG_FRAME_COL_YELLOW 0 | ||
| 67 | #define SIG_FRAME_COL_GREEN 1 | 68 | #define SIG_FRAME_COL_GREEN 1 | ||
| 68 | QString sigStatusToString(const QGpgME::Protocol *cryptProto, int status_code, GpgME::Signature::Summary summary, int &frameColor, bool &showKeyInfos) | 69 | QString sigStatusToString(const QGpgME::Protocol *cryptProto, int status_code, GpgME::Signature::Summary summary, int &frameColor, bool &showKeyInfos) | ||
| 69 | { | 70 | { | ||
| ▲ Show 20 Lines • Show All 390 Lines • ▼ Show 20 Line(s) | 454 | if (node || mp->hasSubParts()) { | |||
| 460 | })); | 461 | })); | ||
| 461 | } else if (!metaData.inProgress) { | 462 | } else if (!metaData.inProgress) { | ||
| 462 | c.insert(QStringLiteral("content"), QVariant::fromValue<GrantleeCallback>([this, mp, htmlWriter](Grantlee::OutputStream *) { | 463 | c.insert(QStringLiteral("content"), QVariant::fromValue<GrantleeCallback>([this, mp, htmlWriter](Grantlee::OutputStream *) { | ||
| 463 | renderWithFactory<MimeTreeParser::MessagePart>(mp, htmlWriter); | 464 | renderWithFactory<MimeTreeParser::MessagePart>(mp, htmlWriter); | ||
| 464 | })); | 465 | })); | ||
| 465 | } | 466 | } | ||
| 466 | 467 | | |||
| 467 | c.insert(QStringLiteral("cryptoProto"), QVariant::fromValue(mp->mCryptoProto)); | 468 | c.insert(QStringLiteral("cryptoProto"), QVariant::fromValue(mp->mCryptoProto)); | ||
| 468 | if (mp->mDecryptRecipients.size() > 0) { | 469 | if (!mp->mDecryptRecipients.empty()) { | ||
| 469 | c.insert(QStringLiteral("decryptedRecipients"), | 470 | c.insert(QStringLiteral("decryptedRecipients"), | ||
| 470 | QVariant::fromValue(mp->mDecryptRecipients)); | 471 | QVariant::fromValue(mp->mDecryptRecipients)); | ||
| 471 | } | 472 | } | ||
| 472 | c.insert(QStringLiteral("block"), &block); | 473 | c.insert(QStringLiteral("block"), &block); | ||
| 473 | 474 | | |||
| 474 | block.setProperty("inProgress", metaData.inProgress); | 475 | block.setProperty("inProgress", metaData.inProgress); | ||
| 475 | block.setProperty("isDecrypted", mp->decryptMessage()); | 476 | block.setProperty("isDecrypted", mp->decryptMessage()); | ||
| 476 | block.setProperty("isDecryptable", metaData.isDecryptable); | 477 | block.setProperty("isDecryptable", metaData.isDecryptable); | ||
| ▲ Show 20 Lines • Show All 435 Lines • Show Last 20 Lines | |||||