Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 256a8ca9 authored by Laurent Montel's avatar Laurent Montel 😁

Minor optimization

parent 7ec9504b
......@@ -389,25 +389,26 @@ bool KMKernel::handleCommandLine(bool noArgsOpensReader, const QStringList &args
const QUrl urlDecoded(QUrl::fromPercentEncoding(arg.toUtf8()));
QMap<QString, QString> values = MessageCore::StringUtil::parseMailtoUrl(urlDecoded);
for (auto it = values.cbegin(), end = values.cend(); it != end; ++it) {
if (it.key() == QLatin1Literal("to")) {
const QString key = it.key();
if (key == QLatin1Literal("to")) {
if (!it->isEmpty()) {
to += *it + QStringLiteral(", ");
}
} else if (it.key() == QLatin1Literal("cc")) {
} else if (key == QLatin1Literal("cc")) {
if (!it->isEmpty()) {
cc += *it + QStringLiteral(", ");
}
} else if (it.key() == QLatin1Literal("bcc")) {
} else if (key == QLatin1Literal("bcc")) {
if (!it->isEmpty()) {
bcc += *it + QStringLiteral(", ");
}
} else if (it.key() == QLatin1Literal("subject")) {
} else if (key == QLatin1Literal("subject")) {
subj = it.value();
} else if (it.key() == QLatin1Literal("body")) {
} else if (key == QLatin1Literal("body")) {
body = it.value();
} else if (it.key() == QLatin1Literal("in-reply-to")) {
} else if (key == QLatin1Literal("in-reply-to")) {
inReplyTo = it.value();
} else if (it.key() == QLatin1Literal("attachment") || it.key() == QLatin1Literal("attach")) {
} else if (key == QLatin1Literal("attachment") || key == QLatin1Literal("attach")) {
if (!it->isEmpty()) {
attachURLs << makeAbsoluteUrl(*it, workingDir);
}
......
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