diff options
author | Saturneric <[email protected]> | 2022-12-04 10:15:50 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2022-12-04 10:16:25 +0000 |
commit | 6bdfddb208bb00fc67a309b0c23af124217d3541 (patch) | |
tree | b2fe2928b8ae7396021b433b808121260c6ef80f /src/core/GpgFunctionObject.cpp | |
parent | fix: solve a refresh crash (diff) | |
download | GpgFrontend-6bdfddb208bb00fc67a309b0c23af124217d3541.tar.gz GpgFrontend-6bdfddb208bb00fc67a309b0c23af124217d3541.zip |
feat(ui, core): add custom key db support
1. add custom key db support
2. add deep restart mode for custom key db settings
3. add core reset function
Diffstat (limited to 'src/core/GpgFunctionObject.cpp')
-rw-r--r-- | src/core/GpgFunctionObject.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/GpgFunctionObject.cpp b/src/core/GpgFunctionObject.cpp index 1289d72f..6ff83d72 100644 --- a/src/core/GpgFunctionObject.cpp +++ b/src/core/GpgFunctionObject.cpp @@ -122,11 +122,15 @@ GpgFrontend::SingletonStorageCollection::GetSingletonStorage( } GpgFrontend::SingletonStorageCollection* -GpgFrontend::SingletonStorageCollection::GetInstance() { +GpgFrontend::SingletonStorageCollection::GetInstance( + bool force_refresh = false) { static SingletonStorageCollection* instance = nullptr; - if (instance == nullptr) { + + if (force_refresh || instance == nullptr) { instance = new SingletonStorageCollection(); + LOG(INFO) << "new single storage collection created: " << instance; } + return instance; } |