diff options
Diffstat (limited to 'framework/domain/messageparser_new.cpp')
-rw-r--r-- | framework/domain/messageparser_new.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/framework/domain/messageparser_new.cpp b/framework/domain/messageparser_new.cpp index 8afd5956..b95a6472 100644 --- a/framework/domain/messageparser_new.cpp +++ b/framework/domain/messageparser_new.cpp | |||
@@ -306,6 +306,8 @@ QHash<int, QByteArray> NewModel::roleNames() const | |||
306 | roles[ContentRole] = "content"; | 306 | roles[ContentRole] = "content"; |
307 | roles[IsEmbededRole] = "embeded"; | 307 | roles[IsEmbededRole] = "embeded"; |
308 | roles[SecurityLevelRole] = "securityLevel"; | 308 | roles[SecurityLevelRole] = "securityLevel"; |
309 | roles[EncryptionErrorType] = "errorType"; | ||
310 | roles[EncryptionErrorString] = "errorString"; | ||
309 | return roles; | 311 | return roles; |
310 | } | 312 | } |
311 | 313 | ||
@@ -374,6 +376,21 @@ QVariant NewModel::data(const QModelIndex &index, int role) const | |||
374 | return QStringLiteral("GREEN"); | 376 | return QStringLiteral("GREEN"); |
375 | case IsEmbededRole: | 377 | case IsEmbededRole: |
376 | return data(index.parent(), IsEmbededRole); | 378 | return data(index.parent(), IsEmbededRole); |
379 | case EncryptionErrorType: | ||
380 | { | ||
381 | switch(encryption->errorType()) { | ||
382 | case Encryption::NoError: | ||
383 | return QString(); | ||
384 | case Encryption::PassphraseError: | ||
385 | return QStringLiteral("PassphraseError"); | ||
386 | case Encryption::KeyMissing: | ||
387 | return QStringLiteral("KeyMissing"); | ||
388 | default: | ||
389 | return QStringLiteral("UnknownError"); | ||
390 | } | ||
391 | } | ||
392 | case EncryptionErrorString: | ||
393 | return encryption->errorString(); | ||
377 | } | 394 | } |
378 | } else if (_data->userType() == qMetaTypeId<Part *>()) { | 395 | } else if (_data->userType() == qMetaTypeId<Part *>()) { |
379 | const auto part = _data->value<Part *>(); | 396 | const auto part = _data->value<Part *>(); |