Verified Commit 1ee07e08 authored by Andre Heinecke's avatar Andre Heinecke
Browse files

Fix sig key and enc key labels in p15cardwidget

They now only show the fingerprint and no longer the
keyref and can be used to copy out the fingerprint.
parent a5d8b761
Pipeline #62450 passed with stage
in 14 minutes and 14 seconds
......@@ -83,6 +83,8 @@ P15CardWidget::P15CardWidget(QWidget *parent)
areaVLay->addWidget(new QLabel(QStringLiteral("<b>%1</b>").arg(i18n("OpenPGP keys:"))));
areaVLay->addWidget(mSigFprLabel);
areaVLay->addWidget(mEncFprLabel);
mSigFprLabel->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard);
mEncFprLabel->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard);
areaVLay->addWidget(new KSeparator(Qt::Horizontal));
areaVLay->addStretch(1);
......@@ -143,7 +145,7 @@ void P15CardWidget::updateSigKeyWidgets(const std::string &fpr)
std::string keyid = fpr;
if (!keyid.empty()) {
QString text = i18n("Signing key:") +
QStringLiteral("\t%1 (%2)")
QStringLiteral(" %1")
.arg(Formatting::prettyID(keyid.c_str()));
text += QStringLiteral("<br/><br/>");
......@@ -199,9 +201,8 @@ void P15CardWidget::setCard(const P15Card *card)
keyid = card->keyFingerprint(OpenPGPCard::pgpEncKeyRef());
if (!keyid.empty()) {
mEncFprLabel->setText(i18n("Encryption key:") +
QStringLiteral(" %1 (%2)")
.arg(Formatting::prettyID(keyid.c_str()))
.arg(QString::fromStdString(card->encryptionKeyRef())));
QStringLiteral(" %1")
.arg(Formatting::prettyID(keyid.c_str())));
keyid.erase(0, keyid.size() - 16);
const auto subkeys = KeyCache::instance()->findSubkeysByKeyID({keyid});
if (subkeys.empty() || subkeys[0].isNull()) {
......
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