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
702f05d2
Commit
702f05d2
authored
Feb 09, 2022
by
Ingo Klöcker
Browse files
Try to make older and newer compilers happy
GnuPG-bug-id: 5805
parent
24b40d8a
Pipeline
#135264
passed with stage
in 3 minutes and 38 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/commands/importcertificatescommand.cpp
View file @
702f05d2
...
...
@@ -1034,13 +1034,22 @@ void ImportCertificatesCommand::Private::setProgressToMaximum()
progressDialog
->
setValue
(
progressDialog
->
maximum
());
}
static
void
disconnectConnection
(
const
QMetaObject
::
Connection
&
connection
)
{
// trivial function for disconnecting a signal-slot connection because
// using a lambda seems to confuse older GCC / MinGW and unnecessarily
// capturing 'this' generates warnings
QObject
::
disconnect
(
connection
);
}
void
ImportCertificatesCommand
::
doCancel
()
{
const
auto
jobsToCancel
=
d
->
jobs
;
std
::
for_each
(
std
::
begin
(
jobsToCancel
),
std
::
end
(
jobsToCancel
),
[
this
](
const
auto
&
job
)
{
qCDebug
(
KLEOPATRA_LOG
)
<<
"Canceling job"
<<
job
.
job
;
std
::
for_each
(
std
::
cbegin
(
job
.
connections
),
std
::
cend
(
job
.
connections
),
[
this
](
const
auto
&
connection
)
{
QObject
::
disconnect
(
c
onnection
);
});
&
disconnect
C
onnection
);
job
.
job
->
slotCancel
();
d
->
importResult
(
ImportResult
{
Error
::
fromCode
(
GPG_ERR_CANCELED
)},
job
.
job
);
});
...
...
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