aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/module
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-12-13 15:22:33 +0000
committersaturneric <[email protected]>2024-12-13 15:22:33 +0000
commitf7a00c58d2824f49ecaafc0152fc0b8213772e46 (patch)
treed012e5fac4ff9f48cd10381a0b79de0294d28d18 /src/core/module
parentdoc: update SECURITY.md (diff)
downloadGpgFrontend-f7a00c58d2824f49ecaafc0152fc0b8213772e46.tar.gz
GpgFrontend-f7a00c58d2824f49ecaafc0152fc0b8213772e46.zip
refactor: using qt containers instead of std containers
Diffstat (limited to 'src/core/module')
-rw-r--r--src/core/module/Event.h2
-rw-r--r--src/core/module/GlobalRegisterTable.cpp7
-rw-r--r--src/core/module/GlobalRegisterTable.h3
-rw-r--r--src/core/module/ModuleManager.cpp6
-rw-r--r--src/core/module/ModuleManager.h6
5 files changed, 12 insertions, 12 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/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/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_,