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
e2cc3b62
Commit
e2cc3b62
authored
Nov 25, 2021
by
Ingo Klöcker
Browse files
Use new UniqueLock to avoid error-prone manual unlocking
parent
fa654bd7
Pipeline
#100812
passed with stage
in 14 minutes and 15 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
e2cc3b62
...
...
@@ -30,7 +30,7 @@ option(DISABLE_KWATCHGNUPG "Don't build the kwatchgnupg tool [default=OFF]" OFF)
# Standalone build. Find / include everything necessary.
set
(
KF5_MIN_VERSION
"5.88.0"
)
set
(
KMIME_VERSION
"5.19.40"
)
set
(
LIBKLEO_VERSION
"5.19.4
4
"
)
set
(
LIBKLEO_VERSION
"5.19.4
5
"
)
set
(
QT_REQUIRED_VERSION
"5.15.2"
)
set
(
GPGME_REQUIRED_VERSION
"1.13.1"
)
set
(
BOOST_REQUIRED_VERSION
"1.58"
)
...
...
src/conf/groupsconfigpage.cpp
View file @
e2cc3b62
...
...
@@ -17,6 +17,7 @@
#include
<Libkleo/Debug>
#include
<Libkleo/KeyCache>
#include
<Libkleo/KeyGroup>
#include
<Libkleo/UniqueLock>
#include
<KLocalizedString>
#include
<KMessageBox>
...
...
@@ -62,14 +63,14 @@ void GroupsConfigPage::Private::onKeysMayHaveChanged()
{
static
QMutex
mutex
;
if
(
!
mutex
.
tryLock
())
{
const
UniqueLock
lock
{
mutex
,
Kleo
::
tryToLock
};
if
(
!
lock
)
{
// prevent reentrace
return
;
}
if
(
savingChanges
)
{
qCDebug
(
KLEOPATRA_LOG
)
<<
__func__
<<
"ignoring changes caused by ourselves"
;
mutex
.
unlock
();
return
;
}
if
(
!
changed
)
{
...
...
@@ -91,7 +92,6 @@ void GroupsConfigPage::Private::onKeysMayHaveChanged()
q
->
load
();
}
}
mutex
.
unlock
();
}
GroupsConfigPage
::
GroupsConfigPage
(
QWidget
*
parent
)
...
...
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