Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Kleopatra
Commits
de7fe071
Commit
de7fe071
authored
May 20, 2021
by
Ingo Klöcker
Browse files
Preserve the double space in the formatted fingerprint in RichText mode
GnuPG-bug-id: 4876
parent
b6b2d04d
Pipeline
#62578
passed with stage
in 13 minutes and 29 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/view/openpgpkeycardwidget.cpp
View file @
de7fe071
...
...
@@ -166,7 +166,7 @@ void OpenPGPKeyCardWidget::Private::updateKeyWidgets(const std::string &openPGPK
widgets
.
createCSRButton
->
setEnabled
(
false
);
}
}
else
{
QStringList
lines
=
{
Formatting
::
prettyID
(
widgets
.
keyFingerprint
.
c_str
())}
;
QStringList
lines
;
if
(
widgets
.
keyFingerprint
.
size
()
>=
16
)
{
const
std
::
string
keyid
=
widgets
.
keyFingerprint
.
substr
(
widgets
.
keyFingerprint
.
size
()
-
16
);
const
auto
subkeys
=
KeyCache
::
instance
()
->
findSubkeysByKeyID
({
keyid
});
...
...
@@ -200,6 +200,10 @@ void OpenPGPKeyCardWidget::Private::updateKeyWidgets(const std::string &openPGPK
lines
.
push_back
(
i18nc
(
"@info"
,
"<em>Invalid fingerprint</em>"
));
}
const
QString
fingerprint
=
widgets
.
keyInfoLabel
->
textFormat
()
==
Qt
::
RichText
?
Formatting
::
prettyID
(
widgets
.
keyFingerprint
.
c_str
()).
replace
(
QLatin1Char
(
' '
),
QLatin1String
(
" "
))
:
Formatting
::
prettyID
(
widgets
.
keyFingerprint
.
c_str
());
lines
.
insert
(
0
,
fingerprint
);
const
auto
lineSeparator
=
widgets
.
keyInfoLabel
->
textFormat
()
==
Qt
::
PlainText
?
QLatin1String
(
"
\n
"
)
:
QLatin1String
(
"<br>"
);
widgets
.
keyInfoLabel
->
setText
(
lines
.
join
(
lineSeparator
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment