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 5c07b4c1 authored by Sandro Knauß's avatar Sandro Knauß

always show keydetails from mimepart

parent a842fa0c
......@@ -93,24 +93,10 @@ bool ApplicationPGPKeyFormatter::render(const MimeTreeParser::MessagePartPtr &ms
block.setProperty("importUrl", mp->makeLink(QStringLiteral("pgpkey")) + QStringLiteral("?action=import"));
block.setProperty("searchRunning", mp->searchRunning());
const auto key = mp->key();
if (key.isNull()) {
block.setProperty("uid", mp->userID());
block.setProperty("fingerprint", mp->fingerprint());
block.setProperty("created", mp->keyDate().toString(Qt::SystemLocaleDate));
} else {
const auto uid = key.userID(0);
if (uid.email() && *uid.email() && uid.name() && *uid.name()) {
block.setProperty("uid", QStringLiteral("%1 <%2>").arg(QString::fromUtf8(uid.name()),
QString::fromUtf8(uid.email())));
} else if (uid.name() && *uid.name()) {
block.setProperty("uid", QString::fromUtf8(uid.name()));
} else if (uid.email() && *uid.email()) {
block.setProperty("uid", QString::fromUtf8(uid.email()));
} else {
block.setProperty("uid", i18n("Unknown identity"));
}
block.setProperty("created", QDateTime::fromTime_t(key.subkey(0).creationTime()).toString(Qt::SystemLocaleDate));
block.setProperty("fingerprint", QString::fromLatin1(key.primaryFingerprint()));
block.setProperty("uid", mp->userID());
block.setProperty("fingerprint", mp->fingerprint());
block.setProperty("created", mp->keyDate().toString(Qt::SystemLocaleDate));
if (!key.isNull()) {
block.setProperty("keyUrl", QStringLiteral("kmail:showCertificate#GpgME ### gpgme ### %1").arg(QString::fromLatin1(key.keyID())));
}
......
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