diff options
Diffstat (limited to 'src/core/module')
-rw-r--r-- | src/core/module/Event.h | 2 | ||||
-rw-r--r-- | src/core/module/GlobalModuleContext.cpp | 2 | ||||
-rw-r--r-- | src/core/module/GlobalRegisterTable.cpp | 7 | ||||
-rw-r--r-- | src/core/module/GlobalRegisterTable.h | 3 | ||||
-rw-r--r-- | src/core/module/ModuleInit.cpp | 5 | ||||
-rw-r--r-- | src/core/module/ModuleManager.cpp | 6 | ||||
-rw-r--r-- | src/core/module/ModuleManager.h | 6 |
7 files changed, 14 insertions, 17 deletions
diff --git a/src/core/module/Event.h b/src/core/module/Event.h index 6d3c0106..d37992b7 100644 --- a/src/core/module/Event.h +++ b/src/core/module/Event.h @@ -43,7 +43,7 @@ class Event; using EventReference = std::shared_ptr<Event>; using EventIdentifier = QString; using EventTriggerIdentifier = QString; -using Evnets = std::vector<Event>; +using Evnets = QContainer<Event>; class GPGFRONTEND_CORE_EXPORT Event { public: diff --git a/src/core/module/GlobalModuleContext.cpp b/src/core/module/GlobalModuleContext.cpp index 71ea85d2..932fcac1 100644 --- a/src/core/module/GlobalModuleContext.cpp +++ b/src/core/module/GlobalModuleContext.cpp @@ -352,7 +352,7 @@ class GlobalModuleContext::Impl { bool registered; bool activate; bool integrated; - QList<QString> listening_event_ids; + QStringList listening_event_ids; }; using ModuleRegisterInfoPtr = std::shared_ptr<ModuleRegisterInfo>; diff --git a/src/core/module/GlobalRegisterTable.cpp b/src/core/module/GlobalRegisterTable.cpp index 0f29a58a..ae0d3ee9 100644 --- a/src/core/module/GlobalRegisterTable.cpp +++ b/src/core/module/GlobalRegisterTable.cpp @@ -107,10 +107,10 @@ class GlobalRegisterTable::Impl { return rtn; } - auto ListChildKeys(const Namespace& n, const Key& k) -> std::vector<Key> { + auto ListChildKeys(const Namespace& n, const Key& k) -> QContainer<Key> { QStringList const segments = (n + "." + k).split('.'); - std::vector<Key> rtn; + QContainer<Key> rtn; { std::shared_lock lock(lock_); @@ -302,8 +302,7 @@ auto GlobalRegisterTable::ListenPublish(QObject* o, Namespace n, Key k, return p_->ListenPublish(o, n, k, c); } -auto GlobalRegisterTable::ListChildKeys(Namespace n, - Key k) -> std::vector<Key> { +auto GlobalRegisterTable::ListChildKeys(Namespace n, Key k) -> QContainer<Key> { return p_->ListChildKeys(n, k); } diff --git a/src/core/module/GlobalRegisterTable.h b/src/core/module/GlobalRegisterTable.h index 15fab0ce..491f0a87 100644 --- a/src/core/module/GlobalRegisterTable.h +++ b/src/core/module/GlobalRegisterTable.h @@ -33,6 +33,7 @@ #include <optional> #include "core/function/SecureMemoryAllocator.h" +#include "core/typedef/CoreTypedef.h" namespace GpgFrontend::Module { @@ -55,7 +56,7 @@ class GlobalRegisterTable : public QObject { auto ListenPublish(QObject *, Namespace, Key, LPCallback) -> bool; - auto ListChildKeys(Namespace n, Key k) -> std::vector<Key>; + auto ListChildKeys(Namespace n, Key k) -> QContainer<Key>; signals: void SignalPublish(Namespace, Key, int, std::any); diff --git a/src/core/module/ModuleInit.cpp b/src/core/module/ModuleInit.cpp index 9f282a5f..ed9068c7 100644 --- a/src/core/module/ModuleInit.cpp +++ b/src/core/module/ModuleInit.cpp @@ -78,10 +78,7 @@ auto LoadExternalMods() -> QMap<QString, bool> { void LoadGpgFrontendModules(ModuleInitArgs) { // give user ability to give up all modules auto disable_loading_all_modules = - GlobalSettingStation::GetInstance() - .GetSettings() - .value("basic/disable_loading_all_modules", false) - .toBool(); + GetSettings().value("basic/disable_loading_all_modules", false).toBool(); if (disable_loading_all_modules) return; // must init at default thread before core diff --git a/src/core/module/ModuleManager.cpp b/src/core/module/ModuleManager.cpp index 8f97adc3..d340a561 100644 --- a/src/core/module/ModuleManager.cpp +++ b/src/core/module/ModuleManager.cpp @@ -220,7 +220,7 @@ class ModuleManager::Impl { return grt_->ListenPublish(o, n, k, c); } - auto ListRTChildKeys(const QString& n, const QString& k) -> std::vector<Key> { + auto ListRTChildKeys(const QString& n, const QString& k) -> QContainer<Key> { return grt_->ListChildKeys(n, k); } @@ -271,7 +271,7 @@ auto ListenRTPublishEvent(QObject* o, Namespace n, Key k, } auto ListRTChildKeys(const QString& namespace_, - const QString& key) -> std::vector<Key> { + const QString& key) -> QContainer<Key> { return ModuleManager::GetInstance().ListRTChildKeys(namespace_, key); } @@ -341,7 +341,7 @@ auto ModuleManager::ListenRTPublish(QObject* o, Namespace n, Key k, } auto ModuleManager::ListRTChildKeys(const QString& n, - const QString& k) -> std::vector<Key> { + const QString& k) -> QContainer<Key> { return p_->ListRTChildKeys(n, k); } diff --git a/src/core/module/ModuleManager.h b/src/core/module/ModuleManager.h index 5c703bf3..3ac35b98 100644 --- a/src/core/module/ModuleManager.h +++ b/src/core/module/ModuleManager.h @@ -101,7 +101,7 @@ class GPGFRONTEND_CORE_EXPORT ModuleManager auto ListenRTPublish(QObject*, Namespace, Key, LPCallback) -> bool; - auto ListRTChildKeys(const QString&, const QString&) -> std::vector<Key>; + auto ListRTChildKeys(const QString&, const QString&) -> QContainer<Key>; auto GRT() -> GlobalRegisterTable*; @@ -175,10 +175,10 @@ auto GPGFRONTEND_CORE_EXPORT ListenRTPublishEvent(QObject*, Namespace, Key, * * @param namespace_ * @param key - * @return std::vector<Key> + * @return QContainer<Key> */ auto GPGFRONTEND_CORE_EXPORT ListRTChildKeys( - const QString& namespace_, const QString& key) -> std::vector<Key>; + const QString& namespace_, const QString& key) -> QContainer<Key>; template <typename T> auto RetrieveRTValueTyped(const QString& namespace_, |