Commit 99d228ea authored by Volker Krause's avatar Volker Krause

Adapt to messagelib changes

parent 23564e78
......@@ -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;
......
{ "formatter":
[
{ "type": "text", "subtype": "calendar" },
{ "type": "text", "subtype": "x-vcalendar" }
{ "mimetype": "text/calendar" }
]
}
{ "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" }
]
}
......@@ -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);
......
{ "formatter":
[
{ "type": "application", "subtype": "ms-tnef" },
{ "type": "application", "subtype": "vnd.ms-tnef" }
{ "mimetype": "application/vnd.ms-tnef" }
]
}
......@@ -320,7 +320,7 @@ public:
private:
bool validIndex(int idx) const
{
return idx >= 0 && idx <= 2;
return idx == 0;
}
};
}
......
{ "formatter":
[
{ "type": "text", "subtype": "x-vcard" },
{ "type": "text", "subtype": "vcard" },
{ "type": "text", "subtype": "directory" }
{ "mimetype": "text/vcard" }
]
}
......@@ -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;
......
{ "formatter":
[
{ "type": "text", "subtype": "x-diff" },
{ "type": "text", "subtype": "x-patch" }
{ "mimetype": "text/x-patch" }
]
}
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