Commit 170f0192 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Astyle kdelibs

parent c056bc30
......@@ -43,7 +43,7 @@ KMime::Content *MimeTreeParser::findTypeInDirectChilds(KMime::Content *content,
foreach (auto child, content->contents()) {
if ((!child->contentType()->isEmpty())
&& (mimeType == child->contentType()->mimeType())) {
&& (mimeType == child->contentType()->mimeType())) {
return child;
}
}
......
......@@ -35,7 +35,7 @@ namespace MimeTreeParser
MimeMessagePart::Ptr createAndParseTempNode(Interface::BodyPart &part, KMime::Content *parentNode, const char *content, const char *cntDesc);
KMime::Content *findTypeInDirectChilds(KMime::Content* content, const QByteArray& mimeType);
KMime::Content *findTypeInDirectChilds(KMime::Content *content, const QByteArray &mimeType);
}
#endif
......@@ -1374,11 +1374,11 @@ void TextMessagePart::writePartIcon()
const QString fileName = nodeHelper->writeNodeToTempFile(mNode);
// show the filename of the image below the embedded image
writer->queue(QLatin1String("<hr/><div><a href=\"") + href + QLatin1String("\">"
"<img align=\"center\" src=\"") + QUrl::fromLocalFile(fileName).url() + QLatin1String("\" border=\"0\" style=\"max-width: 100%\"/></a>"
"</div>"
"<div><a href=\"") + href + QLatin1String("\">") + label + QLatin1String("</a>"
"</div>"
"<div>") + comment + QLatin1String("</div>"));
"<img align=\"center\" src=\"") + QUrl::fromLocalFile(fileName).url() + QLatin1String("\" border=\"0\" style=\"max-width: 100%\"/></a>"
"</div>"
"<div><a href=\"") + href + QLatin1String("\">") + label + QLatin1String("</a>"
"</div>"
"<div>") + comment + QLatin1String("</div>"));
} else {
// show the filename next to the image
const QString iconName = QUrl::fromLocalFile(nodeHelper->iconName(mNode)).url();
......@@ -1389,9 +1389,9 @@ void TextMessagePart::writePartIcon()
const int iconSize = KIconLoader::global()->currentSize(KIconLoader::Desktop);
writer->queue(QStringLiteral("<hr/><div><a href=\"%1\">").arg(href) +
QStringLiteral("<img align=\"center\" height=\"%1\" width=\"%1\" src=\"%2\" border=\"0\" style=\"max-width: 100%\" alt=\"\"/>").arg(QString::number(iconSize), iconName) +
label + QStringLiteral("</a></div>") +
QStringLiteral("<div>%1</div>").arg(comment));
QStringLiteral("<img align=\"center\" height=\"%1\" width=\"%1\" src=\"%2\" border=\"0\" style=\"max-width: 100%\" alt=\"\"/>").arg(QString::number(iconSize), iconName) +
label + QStringLiteral("</a></div>") +
QStringLiteral("<div>%1</div>").arg(comment));
}
}
......@@ -1679,7 +1679,7 @@ void CertMessagePart::writeCertificateImportResult()
MimeTreeParser::HtmlWriter *writer = mOtp->htmlWriter();
if (mImportResult.error()) {
writer->queue(i18n("Sorry, certificate could not be imported.<br />"
"Reason: %1", QString::fromLocal8Bit(mImportResult.error().asString())));
"Reason: %1", QString::fromLocal8Bit(mImportResult.error().asString())));
return;
}
......@@ -1720,7 +1720,7 @@ void CertMessagePart::writeCertificateImportResult()
for (std::vector<GpgME::Import>::const_iterator it = imports.begin(); it != end; ++it) {
if ((*it).error()) {
writer->queue(i18nc("Certificate import failed.", "Failed: %1 (%2)", QLatin1String((*it).fingerprint()),
QString::fromLocal8Bit((*it).error().asString())));
QString::fromLocal8Bit((*it).error().asString())));
} else if ((*it).status() & ~GpgME::Import::ContainedSecretKey) {
if ((*it).status() & GpgME::Import::ContainedSecretKey) {
writer->queue(i18n("New or changed: %1 (secret key available)", QLatin1String((*it).fingerprint())));
......@@ -2079,10 +2079,10 @@ bool CryptoMessagePart::okVerify(const QByteArray &data, const QByteArray &signa
cryptPlugLibName);
}
mMetaData.errorText = i18n("The message is signed, but the "
"validity of the signature cannot be "
"verified.<br />"
"Reason: %1",
errorMsg);
"validity of the signature cannot be "
"verified.<br />"
"Reason: %1",
errorMsg);
}
return mMetaData.isSigned;
......
......@@ -285,7 +285,7 @@ MessagePart::Ptr ObjectTreeParser::parseObjectTreeInternal(KMime::Content *node)
MessagePartList::Ptr mpl(new MessagePartList(this));
mpl->setIsRoot(isRoot);
KMime::Content *parent = node->parent();
auto contents = parent ? parent->contents(): KMime::Content::List();
auto contents = parent ? parent->contents() : KMime::Content::List();
if (contents.isEmpty()) {
contents.append(node);
}
......
......@@ -60,8 +60,8 @@ namespace MimeTreeParser
namespace Interface
{
class MessagePart;
typedef QSharedPointer<MessagePart> MessagePartPtr;
class MessagePart;
typedef QSharedPointer<MessagePart> MessagePartPtr;
}
class PartMetaData;
......@@ -357,7 +357,7 @@ private:
* top-level content.
*/
MessagePartPtr parseObjectTreeInternal(KMime::Content *node);
bool processType(KMime::Content* node, MimeTreeParser::ProcessResult& processResult, const QByteArray& mediaType, const QByteArray& subType, Interface::MessagePartPtr& mpRet);
bool processType(KMime::Content *node, MimeTreeParser::ProcessResult &processResult, const QByteArray &mediaType, const QByteArray &subType, Interface::MessagePartPtr &mpRet);
Interface::MessagePartPtr defaultHandling(KMime::Content *node, ProcessResult &result);
......
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