summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Krause <[email protected]>2017-09-23 14:15:48 +0200
committerVolker Krause <[email protected]>2017-09-23 14:15:48 +0200
commit99d228ea6d31c080c01ce293bdc72181ca51cc92 (patch)
treecaddaf00092bdd5930b45d2ba491cbfe56ce615c
parent23564e78594b1c5c71de9c8b38d4561e9dc33366 (diff)
Adapt to messagelib changes
-rw-r--r--plugins/messageviewer/bodypartformatter/calendar/text_calendar.cpp2
-rw-r--r--plugins/messageviewer/bodypartformatter/calendar/text_calendar.json3
-rw-r--r--plugins/messageviewer/bodypartformatter/gnupgwks/gnupgwks.json6
-rw-r--r--plugins/messageviewer/bodypartformatter/gnupgwks/gnupgwksformatter.cpp3
-rw-r--r--plugins/messageviewer/bodypartformatter/ms-tnef/application_ms-tnef.json3
-rw-r--r--plugins/messageviewer/bodypartformatter/vcard/text_vcard.cpp2
-rw-r--r--plugins/messageviewer/bodypartformatter/vcard/text_vcard.json4
-rw-r--r--plugins/messageviewer/bodypartformatter/xdiff/text_xdiff.cpp2
-rw-r--r--plugins/messageviewer/bodypartformatter/xdiff/text_xdiff.json3
9 files changed, 12 insertions, 16 deletions
diff --git a/plugins/messageviewer/bodypartformatter/calendar/text_calendar.cpp b/plugins/messageviewer/bodypartformatter/calendar/text_calendar.cpp
index 6356fdd..617f5c4 100644
--- a/plugins/messageviewer/bodypartformatter/calendar/text_calendar.cpp
+++ b/plugins/messageviewer/bodypartformatter/calendar/text_calendar.cpp
@@ -1482,7 +1482,7 @@ class Plugin : public QObject, public MimeTreeParser::Interface::BodyPartFormatt
public:
const MimeTreeParser::Interface::BodyPartFormatter *bodyPartFormatter(int idx) const override
{
- if (idx == 0 || idx == 1) {
+ if (idx == 0) {
return new Formatter();
} else {
return 0;
diff --git a/plugins/messageviewer/bodypartformatter/calendar/text_calendar.json b/plugins/messageviewer/bodypartformatter/calendar/text_calendar.json
index 854b520..1c956e3 100644
--- a/plugins/messageviewer/bodypartformatter/calendar/text_calendar.json
+++ b/plugins/messageviewer/bodypartformatter/calendar/text_calendar.json
@@ -1,6 +1,5 @@
{ "formatter":
[
- { "type": "text", "subtype": "calendar" },
- { "type": "text", "subtype": "x-vcalendar" }
+ { "mimetype": "text/calendar" }
]
}
diff --git a/plugins/messageviewer/bodypartformatter/gnupgwks/gnupgwks.json b/plugins/messageviewer/bodypartformatter/gnupgwks/gnupgwks.json
index 27946b0..5dd831d 100644
--- a/plugins/messageviewer/bodypartformatter/gnupgwks/gnupgwks.json
+++ b/plugins/messageviewer/bodypartformatter/gnupgwks/gnupgwks.json
@@ -1,7 +1,7 @@
{ "formatter":
[
- { "type": "multipart", "subtype": "mixed" },
- { "type": "application", "subtype": "vnd.gnupg.wks" },
- { "type": "application", "subtype": "pgp-keys" }
+ { "mimetype": "multipart/mixed" },
+ { "mimetype": "application/vnd.gnupg.wks" },
+ { "mimetype": "application/pgp-keys" }
]
}
diff --git a/plugins/messageviewer/bodypartformatter/gnupgwks/gnupgwksformatter.cpp b/plugins/messageviewer/bodypartformatter/gnupgwks/gnupgwksformatter.cpp
index c09c19d..8c5bc72 100644
--- a/plugins/messageviewer/bodypartformatter/gnupgwks/gnupgwksformatter.cpp
+++ b/plugins/messageviewer/bodypartformatter/gnupgwks/gnupgwksformatter.cpp
@@ -78,7 +78,8 @@ BodyPartFormatter::Result ApplicationGnuPGWKSFormatter::format(BodyPart *part, M
}
if (part->content()->contentType(false) && part->content()->contentType()->isMimeType("multipart/mixed")) {
- const auto formatters = part->source()->bodyPartFormatterFactory()->formattersForType("multipart", "mixed");
+ auto formatters = part->source()->bodyPartFormatterFactory()->formattersForType(QStringLiteral("multipart/mixed"));
+ formatters.removeAll(this);
Q_ASSERT(!formatters.isEmpty()); // there *must* be a multipart/mixed handler
return formatters.at(0)->format(part, writer);
diff --git a/plugins/messageviewer/bodypartformatter/ms-tnef/application_ms-tnef.json b/plugins/messageviewer/bodypartformatter/ms-tnef/application_ms-tnef.json
index 8b104e8..3f5bc2c 100644
--- a/plugins/messageviewer/bodypartformatter/ms-tnef/application_ms-tnef.json
+++ b/plugins/messageviewer/bodypartformatter/ms-tnef/application_ms-tnef.json
@@ -1,6 +1,5 @@
{ "formatter":
[
- { "type": "application", "subtype": "ms-tnef" },
- { "type": "application", "subtype": "vnd.ms-tnef" }
+ { "mimetype": "application/vnd.ms-tnef" }
]
}
diff --git a/plugins/messageviewer/bodypartformatter/vcard/text_vcard.cpp b/plugins/messageviewer/bodypartformatter/vcard/text_vcard.cpp
index 1e6b337..b981675 100644
--- a/plugins/messageviewer/bodypartformatter/vcard/text_vcard.cpp
+++ b/plugins/messageviewer/bodypartformatter/vcard/text_vcard.cpp
@@ -320,7 +320,7 @@ public:
private:
bool validIndex(int idx) const
{
- return idx >= 0 && idx <= 2;
+ return idx == 0;
}
};
}
diff --git a/plugins/messageviewer/bodypartformatter/vcard/text_vcard.json b/plugins/messageviewer/bodypartformatter/vcard/text_vcard.json
index 17264d1..4062c7f 100644
--- a/plugins/messageviewer/bodypartformatter/vcard/text_vcard.json
+++ b/plugins/messageviewer/bodypartformatter/vcard/text_vcard.json
@@ -1,7 +1,5 @@
{ "formatter":
[
- { "type": "text", "subtype": "x-vcard" },
- { "type": "text", "subtype": "vcard" },
- { "type": "text", "subtype": "directory" }
+ { "mimetype": "text/vcard" }
]
}
diff --git a/plugins/messageviewer/bodypartformatter/xdiff/text_xdiff.cpp b/plugins/messageviewer/bodypartformatter/xdiff/text_xdiff.cpp
index 51de758..f071d29 100644
--- a/plugins/messageviewer/bodypartformatter/xdiff/text_xdiff.cpp
+++ b/plugins/messageviewer/bodypartformatter/xdiff/text_xdiff.cpp
@@ -80,7 +80,7 @@ class Plugin : public QObject, public MimeTreeParser::Interface::BodyPartFormatt
public:
const MimeTreeParser::Interface::BodyPartFormatter *bodyPartFormatter(int idx) const override
{
- if (idx == 0 || idx == 1) {
+ if (idx == 0) {
return new Formatter();
}
return nullptr;
diff --git a/plugins/messageviewer/bodypartformatter/xdiff/text_xdiff.json b/plugins/messageviewer/bodypartformatter/xdiff/text_xdiff.json
index 0ad17e6..5041714 100644
--- a/plugins/messageviewer/bodypartformatter/xdiff/text_xdiff.json
+++ b/plugins/messageviewer/bodypartformatter/xdiff/text_xdiff.json
@@ -1,6 +1,5 @@
{ "formatter":
[
- { "type": "text", "subtype": "x-diff" },
- { "type": "text", "subtype": "x-patch" }
+ { "mimetype": "text/x-patch" }
]
}