summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandro Knauß <sknauss@kde.org>2016-06-09 14:35:53 +0200
committerSandro Knauß <sknauss@kde.org>2016-06-09 14:35:53 +0200
commit40018f095fa551696814c07e87704db1cd46605f (patch)
tree84bdf3cc35e45ffd55225a1ce7a4e990d830aad8
parent656a7aebd7cba046aec113716f72015a33a9a477 (diff)
downloadkube-40018f095fa551696814c07e87704db1cd46605f.tar.gz
kube-40018f095fa551696814c07e87704db1cd46605f.zip
Export isHidden flog for messageparts
-rw-r--r--framework/domain/messageparser.cpp5
-rw-r--r--framework/domain/messageparser.h3
2 files changed, 7 insertions, 1 deletions
diff --git a/framework/domain/messageparser.cpp b/framework/domain/messageparser.cpp
index faf17a56..94e16942 100644
--- a/framework/domain/messageparser.cpp
+++ b/framework/domain/messageparser.cpp
@@ -39,10 +39,12 @@ QHash<int, QByteArray> PartModel::roleNames() const
39 QHash<int, QByteArray> roles; 39 QHash<int, QByteArray> roles;
40 roles[Text] = "text"; 40 roles[Text] = "text";
41 roles[IsHtml] = "isHtml"; 41 roles[IsHtml] = "isHtml";
42 roles[IsHidden] = "isHidden";
42 roles[IsEncrypted] = "isEncrypted"; 43 roles[IsEncrypted] = "isEncrypted";
43 roles[IsAttachment] = "isAttachment"; 44 roles[IsAttachment] = "isAttachment";
44 roles[HasContent] = "hasContent"; 45 roles[HasContent] = "hasContent";
45 roles[Type] = "type"; 46 roles[Type] = "type";
47 roles[IsHidden] = "isHidden";
46 return roles; 48 return roles;
47} 49}
48 50
@@ -87,6 +89,9 @@ QVariant PartModel::data(const QModelIndex &index, int role) const
87 return !part->property("htmlContent").toString().isEmpty(); 89 return !part->property("htmlContent").toString().isEmpty();
88 case Type: 90 case Type:
89 return part->metaObject()->className(); 91 return part->metaObject()->className();
92 case IsHidden:
93 return part->property("isHidden").toBool();
94
90 } 95 }
91 } 96 }
92 return QVariant(); 97 return QVariant();
diff --git a/framework/domain/messageparser.h b/framework/domain/messageparser.h
index ac14fad9..3e0255df 100644
--- a/framework/domain/messageparser.h
+++ b/framework/domain/messageparser.h
@@ -72,7 +72,8 @@ public:
72 IsEncrypted, 72 IsEncrypted,
73 IsAttachment, 73 IsAttachment,
74 HasContent, 74 HasContent,
75 Type 75 Type,
76 IsHidden
76 }; 77 };
77 78
78 QHash<int, QByteArray> roleNames() const Q_DECL_OVERRIDE; 79 QHash<int, QByteArray> roleNames() const Q_DECL_OVERRIDE;