aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/struct/GpgOperaResultContext.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ui/struct/GpgOperaResultContext.h49
1 files changed, 6 insertions, 43 deletions
diff --git a/src/ui/struct/GpgOperaResultContext.h b/src/ui/struct/GpgOperaResultContext.h
index ca68dde1..be245bad 100644
--- a/src/ui/struct/GpgOperaResultContext.h
+++ b/src/ui/struct/GpgOperaResultContext.h
@@ -1,5 +1,3 @@
-#include <utility>
-
/**
* Copyright (C) 2021-2024 Saturneric <[email protected]>
*
@@ -53,12 +51,7 @@ struct GpgOperaContext {
GpgOperaContext(QContainer<OperaWaitingCb>& operas,
QContainer<GpgOperaResult>& opera_results, GpgKeyList& keys,
- GpgKeyList& singer_keys, QStringList& unknown_fprs)
- : operas(operas),
- opera_results(opera_results),
- keys(keys),
- singer_keys(singer_keys),
- unknown_fprs(unknown_fprs) {}
+ GpgKeyList& singer_keys, QStringList& unknown_fprs);
};
struct GpgOperaContexts {
@@ -71,45 +64,15 @@ struct GpgOperaContexts {
QMap<int, GpgOperaCategory> categories;
- auto GetContextPath(int category) -> QStringList& {
- if (!categories.contains(category)) categories[category] = {};
- return categories[category].paths;
- }
-
- auto GetContextOutPath(int category) -> QStringList& {
- if (!categories.contains(category)) categories[category] = {};
- return categories[category].o_paths;
- }
-
- auto GetAllPath() -> QStringList {
- QStringList res;
-
- for (auto& category : categories) {
- res.append(category.paths);
- }
- return res;
- }
-
- auto GetAllOutPath() -> QStringList {
- QStringList res;
+ auto GetContextPath(int category) -> QStringList&;
- for (auto& category : categories) {
- res.append(category.o_paths);
- }
- return res;
- }
+ auto GetContextOutPath(int category) -> QStringList&;
- auto GetContext(int category) -> QSharedPointer<GpgOperaContext> {
- if (GetContextPath(category).empty()) return nullptr;
+ auto GetAllPath() -> QStringList;
- auto context = QSharedPointer<GpgOperaContext>::create(
- operas, opera_results, keys, singer_keys, unknown_fprs);
- context->ascii = ascii;
+ auto GetAllOutPath() -> QStringList;
- context->paths = GetContextPath(category);
- context->o_paths = GetContextOutPath(category);
- return context;
- }
+ auto GetContext(int category) -> QSharedPointer<GpgOperaContext>;
};
} // namespace GpgFrontend::UI \ No newline at end of file