aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/GpgCoreInit.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-12-02 20:47:53 +0000
committersaturneric <[email protected]>2024-12-02 20:47:53 +0000
commit39cee0e7ef94d303807ca265d5443c45fbba3be9 (patch)
tree8e65b2804636f4171bb99bfd8eda3155e2cefb3a /src/core/GpgCoreInit.cpp
parentfix: export subkey test cases on windows (diff)
downloadGpgFrontend-39cee0e7ef94d303807ca265d5443c45fbba3be9.tar.gz
GpgFrontend-39cee0e7ef94d303807ca265d5443c45fbba3be9.zip
fix: ui initializes before core fully initialized
Diffstat (limited to 'src/core/GpgCoreInit.cpp')
-rw-r--r--src/core/GpgCoreInit.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/core/GpgCoreInit.cpp b/src/core/GpgCoreInit.cpp
index 4163f179..9ebc9622 100644
--- a/src/core/GpgCoreInit.cpp
+++ b/src/core/GpgCoreInit.cpp
@@ -523,7 +523,7 @@ auto InitGpgFrontendCore(CoreInitArgs args) -> int {
// unit test mode
if (args.unit_test_mode) {
Module::UpsertRTValue("core", "env.state.basic", 1);
- Module::UpsertRTValue("core", "env.state.all", 1);
+ Module::UpsertRTValue("core", "env.state.key_dbs", 1);
CoreSignalStation::GetInstance()->SignalGoodGnupgEnv();
LOG_I() << "Basic ENV Checking Finished";
return 0;
@@ -581,8 +581,6 @@ auto InitGpgFrontendCore(CoreInitArgs args) -> int {
// key database path
QList<KeyDatabaseItemSO> buffered_key_dbs;
- LOG_I() << "AAAAAA";
-
// try to use user defined key database
if (!key_dbs.empty()) {
for (const auto& key_database : key_dbs) {
@@ -637,7 +635,7 @@ auto InitGpgFrontendCore(CoreInitArgs args) -> int {
channel_index++;
}
- Module::UpsertRTValue("core", "env.state.all", 1);
+ Module::UpsertRTValue("core", "env.state.key_dbs", 1);
return 0;
},
@@ -689,12 +687,12 @@ void StartMonitorCoreInitializationStatus() {
}
LOG_D() << "monitor: good, all module are registered.";
- int key_db_init_state =
- Module::RetrieveRTValueTypedOrDefault<>("core", "env.state.all", 0);
+ int key_db_init_state = Module::RetrieveRTValueTypedOrDefault<>(
+ "core", "env.state.key_dbs", 0);
for (;;) {
if (key_db_init_state != 0) break;
key_db_init_state = Module::RetrieveRTValueTypedOrDefault<>(
- "core", "env.state.all", 0);
+ "core", "env.state.key_dbs", 0);
LOG_D() << "monitor: key dbs are still initializing, waiting...";
QThread::msleep(15);
@@ -703,6 +701,7 @@ void StartMonitorCoreInitializationStatus() {
LOG_D()
<< "monitor: core is fully initialized, sending signal to ui...";
+ Module::UpsertRTValue("core", "env.state.all", 1);
CoreSignalStation::GetInstance()->SignalCoreFullyLoaded();
return 0;
},