Skip to content
GitLab
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
a6e9353e
Commit
a6e9353e
authored
Aug 02, 2022
by
Ingo Klöcker
Browse files
Fix building of localized string with list of imported user IDs
GnuPG-bug-id: 6118
parent
33baefc6
Pipeline
#211929
passed with stage
in 3 minutes and 53 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/commands/importcertificatescommand.cpp
View file @
a6e9353e
...
...
@@ -532,12 +532,10 @@ static void handleOwnerTrust(const std::vector<ImportResultData> &results)
return
;
}
QStringList
uids
;
const
auto
toTrustOwnerUserIDs
{
toTrustOwner
.
userIDs
()};
uids
.
reserve
(
toTrustOwnerUserIDs
.
size
());
for
(
const
UserID
&
uid
:
toTrustOwnerUserIDs
)
{
uids
<<
Formatting
::
prettyNameAndEMail
(
uid
);
}
const
KLocalizedString
uids
=
std
::
accumulate
(
toTrustOwnerUserIDs
.
cbegin
(),
toTrustOwnerUserIDs
.
cend
(),
KLocalizedString
{},
[](
KLocalizedString
temp
,
const
auto
&
uid
)
{
return
kxi18nc
(
"@info"
,
"%1<item>%2</item>"
).
subs
(
temp
).
subs
(
Formatting
::
prettyNameAndEMail
(
uid
));
});
const
QString
str
=
xi18nc
(
"@info"
,
"<title>You have imported a Secret Key.</title>"
...
...
@@ -545,11 +543,11 @@ static void handleOwnerTrust(const std::vector<ImportResultData> &results)
"<numid>%1</numid>"
"</para>"
"<para>And claims the user IDs:"
"<list>
<item>%2</item>
</list>"
"<list>
%2
</list>"
"</para>"
"Is this your own key? (Set trust level to ultimate)"
,
QString
::
fromUtf8
(
fingerPr
),
uids
.
join
(
QLatin1String
(
"</item><item>"
))
);
uids
);
int
k
=
KMessageBox
::
questionYesNo
(
nullptr
,
str
,
i18nc
(
"@title:window"
,
"Secret key imported"
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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