diff options
author | Saturneric <[email protected]> | 2022-05-09 14:40:54 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2022-05-09 14:40:54 +0000 |
commit | 670733f7a90d337d546afab22ddedeedec6d3d67 (patch) | |
tree | 2c64c0667d2cac45040257802c40963f89737700 /src/core/GpgCoreInit.cpp | |
parent | doc: add entry to developer document. (diff) | |
download | GpgFrontend-670733f7a90d337d546afab22ddedeedec6d3d67.tar.gz GpgFrontend-670733f7a90d337d546afab22ddedeedec6d3d67.zip |
fix: fix crash poblem when doing operations
1. refactor GpgFunctionObject to solve shared library problem.
2. fix multi-threading issues in refreshing.
3. improve loading speed for key list
4. improve ui operation
5. do other fixing and improving operations
Diffstat (limited to 'src/core/GpgCoreInit.cpp')
-rw-r--r-- | src/core/GpgCoreInit.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/core/GpgCoreInit.cpp b/src/core/GpgCoreInit.cpp index e9b8fcdc..41cf99cb 100644 --- a/src/core/GpgCoreInit.cpp +++ b/src/core/GpgCoreInit.cpp @@ -28,6 +28,9 @@ #include "GpgCoreInit.h" +#include <memory> + +#include "GpgFunctionObject.h" #include "core/GpgContext.h" #include "core/function/GlobalSettingStation.h" @@ -70,27 +73,25 @@ void init_logging() { void init_gpgfrontend_core() { // init default channel GpgFrontend::GpgContext::CreateInstance( - GPGFRONTEND_DEFAULT_CHANNEL, - [&]() -> std::unique_ptr<GpgFrontend::GpgContext> { + GPGFRONTEND_DEFAULT_CHANNEL, [&]() -> std::unique_ptr<ChannelObject> { GpgFrontend::GpgContextInitArgs args; - return std::make_unique<GpgFrontend::GpgContext>(args); + return std::unique_ptr<ChannelObject>(new GpgContext(args)); }); // init non-ascii channel GpgFrontend::GpgContext::CreateInstance( - GPGFRONTEND_NON_ASCII_CHANNEL, - [&]() -> std::unique_ptr<GpgFrontend::GpgContext> { + GPGFRONTEND_NON_ASCII_CHANNEL, [&]() -> std::unique_ptr<ChannelObject> { GpgFrontend::GpgContextInitArgs args; args.ascii = false; - return std::make_unique<GpgFrontend::GpgContext>(args); + return std::unique_ptr<ChannelObject>(new GpgContext(args)); }); } void new_default_settings_channel(int channel) { GpgFrontend::GpgContext::CreateInstance( - channel, [&]() -> std::unique_ptr<GpgFrontend::GpgContext> { + channel, [&]() -> std::unique_ptr<ChannelObject> { GpgFrontend::GpgContextInitArgs args; - return std::make_unique<GpgFrontend::GpgContext>(args); + return std::unique_ptr<ChannelObject>(new GpgContext(args)); }); } |