diff options
author | saturneric <[email protected]> | 2023-12-15 13:14:17 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2023-12-15 13:14:17 +0000 |
commit | f9a49043c35e73fc2d4ffb3ed9b39c33849c43b3 (patch) | |
tree | 7e03b0b62119ff5d5dcd732ec1ccb7d2296df86d /src/core/module/Module.h | |
parent | fix: slove some issues on memory and intilizations (diff) | |
download | GpgFrontend-f9a49043c35e73fc2d4ffb3ed9b39c33849c43b3.tar.gz GpgFrontend-f9a49043c35e73fc2d4ffb3ed9b39c33849c43b3.zip |
fix: slove threading and memory issues
Diffstat (limited to 'src/core/module/Module.h')
-rw-r--r-- | src/core/module/Module.h | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/core/module/Module.h b/src/core/module/Module.h index da87f88e..6cc1cc3f 100644 --- a/src/core/module/Module.h +++ b/src/core/module/Module.h @@ -41,7 +41,6 @@ using ModuleIdentifier = std::string; using ModuleVersion = std::string; using ModuleMetaData = std::map<std::string, std::string>; using ModulePtr = std::shared_ptr<Module>; -using GMCPtr = std::shared_ptr<GlobalModuleContext>; using TaskRunnerPtr = std::shared_ptr<Thread::TaskRunner>; @@ -52,26 +51,26 @@ class GPGFRONTEND_CORE_EXPORT Module : public QObject { ~Module(); - virtual bool Register() = 0; + virtual auto Register() -> bool = 0; - virtual bool Active() = 0; + virtual auto Active() -> bool = 0; - virtual int Exec(EventRefrernce) = 0; + virtual auto Exec(EventRefrernce) -> int = 0; - virtual bool Deactive() = 0; + virtual auto Deactive() -> bool = 0; - ModuleIdentifier GetModuleIdentifier() const; + [[nodiscard]] auto GetModuleIdentifier() const -> ModuleIdentifier; - void SetGPC(GMCPtr); + void SetGPC(GlobalModuleContext*); protected: - int getChannel(); + auto getChannel() -> int; - int getDefaultChannel(); + auto getDefaultChannel() -> int; - TaskRunnerPtr getTaskRunner(); + auto getTaskRunner() -> TaskRunnerPtr; - bool listenEvent(EventIdentifier); + auto listenEvent(EventIdentifier) -> bool; private: class Impl; |