From 24c28eb752aa611dd1670f3fa7ab6b358b052f1b Mon Sep 17 00:00:00 2001 From: saturneric Date: Sat, 26 Oct 2024 15:43:14 +0200 Subject: fix: test basic operations of multi key db and solve issues --- src/core/GpgCoreInit.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/core/GpgCoreInit.cpp') 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( -- cgit v1.2.3