Verified Commit 8bdc2dab authored by Andre Heinecke's avatar Andre Heinecke
Browse files

Insert double space in the middle of fpr

In the grouped format for a fingerprint it is nicer to
have a double space in the middle. This is also how
GnuPG prints a fingerprint.
parent 5f54607e
...@@ -1032,7 +1032,14 @@ QString Formatting::prettyID(const char *id) ...@@ -1032,7 +1032,14 @@ QString Formatting::prettyID(const char *id)
if (!id) { if (!id) {
return QString(); return QString();
} }
return QString::fromLatin1(id).toUpper().replace(QRegularExpression(QStringLiteral("(....)")), QStringLiteral("\\1 ")).trimmed(); QString ret = QString::fromLatin1(id).toUpper().replace(QRegularExpression(QStringLiteral("(....)")),
QStringLiteral("\\1 ")).trimmed();
// For the standard 10 group fingerprint let us use a double space in the
// middle to increase readability
if (ret.size() == 49) {
ret.insert(24, QLatin1Char(' '));
return ret;
} }
QString Formatting::origin(int o) QString Formatting::origin(int o)
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