aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpg/GpgFunctionObject.h
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2022-01-02 03:40:22 +0000
committerSaturneric <[email protected]>2022-01-02 03:40:22 +0000
commita056f2186de2470d4328bd1cd682e5e484af4587 (patch)
tree27775ca169ad93fc812e94a4da99ebd3fa1c53f9 /src/gpg/GpgFunctionObject.h
parent<refactor, test>(core, test): test decryption when key not found (diff)
downloadGpgFrontend-a056f2186de2470d4328bd1cd682e5e484af4587.tar.gz
GpgFrontend-a056f2186de2470d4328bd1cd682e5e484af4587.zip
<refactor, fixed, test>(core, ui): add & modify core and ui
1. add init functions for core. 2. add non ascii settings. 3. fit ui with this version of core.
Diffstat (limited to 'src/gpg/GpgFunctionObject.h')
-rw-r--r--src/gpg/GpgFunctionObject.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gpg/GpgFunctionObject.h b/src/gpg/GpgFunctionObject.h
index d81371d9..404b2f84 100644
--- a/src/gpg/GpgFunctionObject.h
+++ b/src/gpg/GpgFunctionObject.h
@@ -34,12 +34,15 @@
#include <stdexcept>
#include <string>
+#include "GpgConstants.h"
+
namespace GpgFrontend {
template <typename T>
class SingletonFunctionObject {
public:
- static T& GetInstance(int channel = 0) {
+ static T& GetInstance(
+ int channel = GpgFrontend::GPGFRONTEND_DEFAULT_CHANNEL) {
static_assert(std::is_base_of<SingletonFunctionObject<T>, T>::value,
"T not derived from SingletonFunctionObject<T>");
@@ -138,7 +141,8 @@ class SingletonFunctionObject {
};
template <typename T>
-int SingletonFunctionObject<T>::_default_channel = 0;
+int SingletonFunctionObject<T>::_default_channel =
+ GpgFrontend::GPGFRONTEND_DEFAULT_CHANNEL;
template <typename T>
std::mutex SingletonFunctionObject<T>::_instance_mutex;