aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/GpgCoreInit.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-10-26 13:43:14 +0000
committersaturneric <[email protected]>2024-10-26 13:43:14 +0000
commit24c28eb752aa611dd1670f3fa7ab6b358b052f1b (patch)
tree6a4f9af003fa4a86b7d7e29a965e37a231951092 /src/core/GpgCoreInit.cpp
parentfix: thread concurrent crash issue (diff)
downloadGpgFrontend-24c28eb752aa611dd1670f3fa7ab6b358b052f1b.tar.gz
GpgFrontend-24c28eb752aa611dd1670f3fa7ab6b358b052f1b.zip
fix: test basic operations of multi key db and solve issues
Diffstat (limited to 'src/core/GpgCoreInit.cpp')
-rw-r--r--src/core/GpgCoreInit.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core/GpgCoreInit.cpp b/src/core/GpgCoreInit.cpp
index d89398e3..3a5edff2 100644
--- a/src/core/GpgCoreInit.cpp
+++ b/src/core/GpgCoreInit.cpp
@@ -410,10 +410,13 @@ void InitGpgFrontendCore(CoreInitArgs args) {
}
if (args.load_default_gpg_context) {
- if (!GpgKeyGetter::GetInstance().FlushKeyCache()) {
- CoreSignalStation::GetInstance()->SignalBadGnupgEnv(
- QCoreApplication::tr("Gpg Key Database initiation failed"));
- };
+ // load keys from all key dbs
+ for (int channel : GpgContext::GetAllChannelId()) {
+ if (!GpgKeyGetter::GetInstance(channel).FlushKeyCache()) {
+ CoreSignalStation::GetInstance()->SignalBadGnupgEnv(
+ QCoreApplication::tr("Gpg Key Database initiation failed"));
+ };
+ }
}
FLOG_D(