aboutsummaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2025-02-03 18:13:23 +0000
committersaturneric <[email protected]>2025-02-03 19:14:29 +0000
commit37d5b7e5546fde0433a2480eea5a2c3b222139ff (patch)
tree9c1f6f2d4b456dea2fb1af4aefcf4f1ac6ae97ee /src/core
parentfix: set pb range when size of operas > 1 (diff)
downloadGpgFrontend-37d5b7e5546fde0433a2480eea5a2c3b222139ff.tar.gz
GpgFrontend-37d5b7e5546fde0433a2480eea5a2c3b222139ff.zip
fix: qt5 compile issues
Diffstat (limited to 'src/core')
-rw-r--r--src/core/function/KeyPackageOperator.cpp2
-rw-r--r--src/core/function/basic/GpgFunctionObject.h1
-rw-r--r--src/core/function/gpg/GpgBasicOperator.cpp6
-rw-r--r--src/core/function/gpg/GpgCommandExecutor.cpp2
-rw-r--r--src/core/function/gpg/GpgCommandExecutor.h2
-rw-r--r--src/core/function/gpg/GpgFileOpera.cpp4
-rw-r--r--src/core/function/gpg/GpgKeyGetter.cpp6
-rw-r--r--src/core/function/gpg/GpgKeyImportExporter.cpp10
-rw-r--r--src/core/function/gpg/GpgKeyManager.cpp2
-rw-r--r--src/core/function/gpg/GpgKeyOpera.cpp8
-rw-r--r--src/core/function/gpg/GpgUIDOperator.cpp2
-rw-r--r--src/core/model/DataObject.cpp2
-rw-r--r--src/core/model/DataObject.h2
-rw-r--r--src/core/model/GpgDecryptResult.cpp2
-rw-r--r--src/core/model/GpgEncryptResult.cpp5
-rw-r--r--src/core/model/GpgKey.h8
-rw-r--r--src/core/model/GpgSignResult.cpp5
-rw-r--r--src/core/model/GpgVerifyResult.cpp6
-rw-r--r--src/core/module/GlobalModuleContext.cpp12
-rw-r--r--src/core/module/GlobalModuleContext.h4
-rw-r--r--src/core/module/GlobalRegisterTable.cpp2
-rw-r--r--src/core/module/Module.cpp2
-rw-r--r--src/core/module/ModuleManager.cpp11
-rw-r--r--src/core/module/ModuleManager.h4
-rw-r--r--src/core/struct/settings_object/KeyDatabaseListSO.h3
-rw-r--r--src/core/utils/GpgUtils.cpp8
-rw-r--r--src/core/utils/GpgUtils.h11
27 files changed, 68 insertions, 64 deletions
diff --git a/src/core/function/KeyPackageOperator.cpp b/src/core/function/KeyPackageOperator.cpp
index ace277b8..a5f1989c 100644
--- a/src/core/function/KeyPackageOperator.cpp
+++ b/src/core/function/KeyPackageOperator.cpp
@@ -45,7 +45,7 @@ namespace GpgFrontend {
auto KeyPackageOperator::GeneratePassphrase(const QString& phrase_path,
QString& phrase) -> bool {
phrase = PassphraseGenerator::GetInstance().Generate(256);
- FLOG_D("generated passphrase: %lld bytes", phrase.size());
+ FLOG_D() << "generated passphrase: " << phrase.size() << "bytes";
return WriteFile(phrase_path, phrase.toUtf8());
}
diff --git a/src/core/function/basic/GpgFunctionObject.h b/src/core/function/basic/GpgFunctionObject.h
index 41a597e5..fea400aa 100644
--- a/src/core/function/basic/GpgFunctionObject.h
+++ b/src/core/function/basic/GpgFunctionObject.h
@@ -34,6 +34,7 @@
#include "core/function/basic/ChannelObject.h"
#include "core/function/basic/SingletonStorage.h"
#include "core/function/basic/SingletonStorageCollection.h"
+#include "core/typedef/CoreTypedef.h"
#include "core/utils/MemoryUtils.h"
namespace GpgFrontend {
diff --git a/src/core/function/gpg/GpgBasicOperator.cpp b/src/core/function/gpg/GpgBasicOperator.cpp
index 7f36e60a..30fd8912 100644
--- a/src/core/function/gpg/GpgBasicOperator.cpp
+++ b/src/core/function/gpg/GpgBasicOperator.cpp
@@ -55,7 +55,9 @@ void SetSignersImpl(GpgContext& ctx_, const KeyArgsList& signers, bool ascii) {
CheckGpgError(error);
}
}
- if (signers.size() != gpgme_signers_count(ctx_.DefaultContext())) {
+
+ auto count = gpgme_signers_count(ctx_.DefaultContext());
+ if (static_cast<unsigned int>(signers.size()) != count) {
FLOG_D("not all signers added");
}
}
@@ -286,7 +288,7 @@ auto EncryptSignImpl(GpgContext& ctx_, const KeyArgsList& keys,
QContainer<gpgme_key_t> recipients(keys.begin(), keys.end());
// Last entry data_in array has to be nullptr
- recipients.emplace_back(nullptr);
+ recipients.push_back(nullptr);
SetSignersImpl(ctx_, signers, ascii);
diff --git a/src/core/function/gpg/GpgCommandExecutor.cpp b/src/core/function/gpg/GpgCommandExecutor.cpp
index 5256de60..b244dfa4 100644
--- a/src/core/function/gpg/GpgCommandExecutor.cpp
+++ b/src/core/function/gpg/GpgCommandExecutor.cpp
@@ -201,7 +201,7 @@ void GpgCommandExecutor::ExecuteConcurrentlySync(ExecuteContexts contexts) {
QObject::connect(task, &Thread::Task::SignalTaskEnd, [&]() {
--remaining_tasks;
- FLOG_D("remaining tasks: %lld", remaining_tasks);
+ LOG_D() << "remaining tasks: " << remaining_tasks;
if (remaining_tasks <= 0) {
FLOG_D("no remaining task, quit");
looper.quit();
diff --git a/src/core/function/gpg/GpgCommandExecutor.h b/src/core/function/gpg/GpgCommandExecutor.h
index cb35e686..5a2f13db 100644
--- a/src/core/function/gpg/GpgCommandExecutor.h
+++ b/src/core/function/gpg/GpgCommandExecutor.h
@@ -56,7 +56,7 @@ class GPGFRONTEND_CORE_EXPORT GpgCommandExecutor {
GpgCommandExecutorInterator int_func = [](QProcess *) {});
};
- using ExecuteContexts = QList<ExecuteContext>;
+ using ExecuteContexts = QContainer<ExecuteContext>;
/**
* @brief Excuting a command
diff --git a/src/core/function/gpg/GpgFileOpera.cpp b/src/core/function/gpg/GpgFileOpera.cpp
index 3b2efd52..a3ad1ac5 100644
--- a/src/core/function/gpg/GpgFileOpera.cpp
+++ b/src/core/function/gpg/GpgFileOpera.cpp
@@ -461,6 +461,8 @@ auto GpgFileOpera::EncryptDirectorySymmetricSync(
const QString& out_path) -> std::tuple<GpgError, DataObjectPtr> {
auto ex = CreateStandardGFDataExchanger();
+ CreateArchiveHelper(in_path, ex);
+
return RunGpgOperaSync(
[=](const DataObjectPtr& data_object) -> GpgError {
GpgData data_in(ex);
@@ -470,8 +472,6 @@ auto GpgFileOpera::EncryptDirectorySymmetricSync(
data_object);
},
"gpgme_op_encrypt_symmetric", "2.1.0");
-
- CreateArchiveHelper(in_path, ex);
}
} // namespace GpgFrontend \ No newline at end of file
diff --git a/src/core/function/gpg/GpgKeyGetter.cpp b/src/core/function/gpg/GpgKeyGetter.cpp
index e5b234f8..a4ca6021 100644
--- a/src/core/function/gpg/GpgKeyGetter.cpp
+++ b/src/core/function/gpg/GpgKeyGetter.cpp
@@ -151,7 +151,7 @@ class GpgKeyGetter::Impl : public SingletonFunctionObject<GpgKeyGetter::Impl> {
auto GetKeys(const KeyIdArgsList& ids) -> GpgKeyList {
auto keys = GpgKeyList{};
- for (const auto& key_id : ids) keys.emplace_back(GetKey(key_id, true));
+ for (const auto& key_id : ids) keys.push_back(GetKey(key_id, true));
return keys;
}
@@ -159,7 +159,7 @@ class GpgKeyGetter::Impl : public SingletonFunctionObject<GpgKeyGetter::Impl> {
// get the lock
std::lock_guard<std::mutex> lock(ctx_mutex_);
auto keys_copy = GpgKeyList{};
- for (const auto& key : keys) keys_copy.emplace_back(key);
+ for (const auto& key : keys) keys_copy.push_back(key);
return keys_copy;
}
@@ -192,7 +192,7 @@ class GpgKeyGetter::Impl : public SingletonFunctionObject<GpgKeyGetter::Impl> {
* @brief
*
*/
- QList<GpgKey> keys_cache_;
+ QContainer<GpgKey> keys_cache_;
/**
* @brief shared mutex for the keys cache
diff --git a/src/core/function/gpg/GpgKeyImportExporter.cpp b/src/core/function/gpg/GpgKeyImportExporter.cpp
index 6c78f760..60c06995 100644
--- a/src/core/function/gpg/GpgKeyImportExporter.cpp
+++ b/src/core/function/gpg/GpgKeyImportExporter.cpp
@@ -60,7 +60,7 @@ auto GpgKeyImportExporter::ImportKey(const GFBuffer& in_buffer)
GpgImportInformation::GpgImportedKey key;
key.import_status = static_cast<int>(status->status);
key.fpr = status->fpr;
- import_info->imported_keys.emplace_back(key);
+ import_info->imported_keys.push_back(key);
status = status->next;
}
return import_info;
@@ -85,8 +85,8 @@ auto GpgKeyImportExporter::ExportKey(const GpgKey& key, bool secret, bool ascii,
QContainer<gpgme_key_t> keys_array;
// Last entry data_in array has to be nullptr
- keys_array.emplace_back(key);
- keys_array.emplace_back(nullptr);
+ keys_array.push_back(static_cast<gpgme_key_t>(key));
+ keys_array.push_back(nullptr);
GpgData data_out;
auto* ctx = ascii ? ctx_.DefaultContext() : ctx_.BinaryContext();
@@ -117,7 +117,7 @@ void GpgKeyImportExporter::ExportKeys(const KeyArgsList& keys, bool secret,
QContainer<gpgme_key_t> keys_array(keys.begin(), keys.end());
// Last entry data_in array has to be nullptr
- keys_array.emplace_back(nullptr);
+ keys_array.push_back(nullptr);
GpgData data_out;
auto* ctx = ascii ? ctx_.DefaultContext() : ctx_.BinaryContext();
@@ -147,7 +147,7 @@ void GpgKeyImportExporter::ExportAllKeys(const KeyArgsList& keys, bool secret,
QContainer<gpgme_key_t> keys_array(keys.begin(), keys.end());
// Last entry data_in array has to be nullptr
- keys_array.emplace_back(nullptr);
+ keys_array.push_back(nullptr);
GpgData data_out;
auto* ctx = ascii ? ctx_.DefaultContext() : ctx_.BinaryContext();
diff --git a/src/core/function/gpg/GpgKeyManager.cpp b/src/core/function/gpg/GpgKeyManager.cpp
index afa775eb..36f68bdc 100644
--- a/src/core/function/gpg/GpgKeyManager.cpp
+++ b/src/core/function/gpg/GpgKeyManager.cpp
@@ -272,7 +272,7 @@ auto GpgKeyManager::RevokeSubkey(const GpgKey& key, int subkey_index,
// dealing with reason text
auto reason_text_lines = SecureCreateSharedObject<QStringList>(
- reason_text.split('\n', Qt::SkipEmptyParts).toVector());
+ reason_text.split('\n', Qt::SkipEmptyParts));
AutomatonNextStateHandler next_state_handler =
[](AutomatonState state, QString status, QString args) {
diff --git a/src/core/function/gpg/GpgKeyOpera.cpp b/src/core/function/gpg/GpgKeyOpera.cpp
index 23a848ee..9511b347 100644
--- a/src/core/function/gpg/GpgKeyOpera.cpp
+++ b/src/core/function/gpg/GpgKeyOpera.cpp
@@ -111,7 +111,7 @@ void GpgKeyOpera::GenerateRevokeCert(const GpgKey& key,
// dealing with reason text
auto reason_text_lines = GpgFrontend::SecureCreateSharedObject<QStringList>(
- revocation_reason_text.split('\n', Qt::SkipEmptyParts).toVector());
+ revocation_reason_text.split('\n', Qt::SkipEmptyParts));
const auto app_path = Module::RetrieveRTValueTypedOrDefault<>(
"core", "gpgme.ctx.app_path", QString{});
@@ -124,10 +124,10 @@ void GpgKeyOpera::GenerateRevokeCert(const GpgKey& key,
if (exit_code != 0) {
LOG_W() << "gnupg gen revoke execute error, process stderr: "
<< p_err << ", process stdout: " << p_out;
- } else {
- FLOG_D("gnupg gen revoke exit_code: %d, process stdout size: %lld",
- exit_code, p_out.size());
+ return;
}
+ LOG_D() << "gnupg gen revoke exit_code: " << exit_code
+ << "process stdout size: " << p_out.size();
},
nullptr,
[revocation_reason_code, reason_text_lines](QProcess* proc) -> void {
diff --git a/src/core/function/gpg/GpgUIDOperator.cpp b/src/core/function/gpg/GpgUIDOperator.cpp
index e87a710d..b9312745 100644
--- a/src/core/function/gpg/GpgUIDOperator.cpp
+++ b/src/core/function/gpg/GpgUIDOperator.cpp
@@ -156,7 +156,7 @@ auto GpgUIDOperator::RevokeUID(const GpgKey& key, int uid_index,
// dealing with reason text
auto reason_text_lines = GpgFrontend::SecureCreateSharedObject<QStringList>(
- reason_text.split('\n', Qt::SkipEmptyParts).toVector());
+ reason_text.split('\n', Qt::SkipEmptyParts));
AutomatonNextStateHandler next_state_handler = [](AutomatonState state,
QString status,
diff --git a/src/core/model/DataObject.cpp b/src/core/model/DataObject.cpp
index 13838941..dbe5588e 100644
--- a/src/core/model/DataObject.cpp
+++ b/src/core/model/DataObject.cpp
@@ -41,7 +41,7 @@ class DataObject::Impl {
void AppendObject(const std::any& obj) { params_.push_back(obj); }
auto GetParameter(size_t index) -> std::any {
- if (index >= params_.size()) {
+ if (index >= static_cast<size_t>(params_.size())) {
throw std::out_of_range("index out of range");
}
return params_[index];
diff --git a/src/core/model/DataObject.h b/src/core/model/DataObject.h
index 1713e8dd..a2b19413 100644
--- a/src/core/model/DataObject.h
+++ b/src/core/model/DataObject.h
@@ -65,7 +65,7 @@ class GPGFRONTEND_CORE_EXPORT DataObject {
if (sizeof...(Args) != GetObjectSize()) return false;
QContainer<std::type_info const*> type_list = {&typeid(Args)...};
- for (size_t i = 0; i < type_list.size(); ++i) {
+ for (qsizetype i = 0; i < static_cast<qsizetype>(type_list.size()); ++i) {
if (std::type_index(*type_list[i]) !=
std::type_index((*this)[i].type())) {
return false;
diff --git a/src/core/model/GpgDecryptResult.cpp b/src/core/model/GpgDecryptResult.cpp
index 82398d96..a2e2c9a7 100644
--- a/src/core/model/GpgDecryptResult.cpp
+++ b/src/core/model/GpgDecryptResult.cpp
@@ -53,7 +53,7 @@ auto GpgDecryptResult::Recipients() -> QContainer<GpgRecipient> {
for (auto* reci = result_ref_->recipients; reci != nullptr;
reci = reci->next) {
try {
- result.emplace_back(reci);
+ result.push_back(GpgRecipient{reci});
} catch (...) {
FLOG_W(
"caught exception when processing invalid_recipients, "
diff --git a/src/core/model/GpgEncryptResult.cpp b/src/core/model/GpgEncryptResult.cpp
index b5af09b1..69a8535a 100644
--- a/src/core/model/GpgEncryptResult.cpp
+++ b/src/core/model/GpgEncryptResult.cpp
@@ -53,7 +53,10 @@ auto GpgEncryptResult::InvalidRecipients()
for (auto* invalid_key = result_ref_->invalid_recipients;
invalid_key != nullptr; invalid_key = invalid_key->next) {
try {
- result.emplace_back(QString{invalid_key->fpr}, invalid_key->reason);
+ result.push_back({
+ QString{invalid_key->fpr},
+ invalid_key->reason,
+ });
} catch (...) {
FLOG_W(
"caught exception when processing invalid_recipients, "
diff --git a/src/core/model/GpgKey.h b/src/core/model/GpgKey.h
index 1f902ca5..26423dae 100644
--- a/src/core/model/GpgKey.h
+++ b/src/core/model/GpgKey.h
@@ -356,12 +356,8 @@ class GPGFRONTEND_CORE_EXPORT GpgKey {
*/
auto operator<=(const GpgKey&) const -> bool;
- /**
- * @brief
- *
- * @return gpgme_key_t
- */
- explicit operator gpgme_key_t() const;
+ // NOLINTNEXTLINE(google-explicit-constructor)
+ operator gpgme_key_t() const;
private:
/**
diff --git a/src/core/model/GpgSignResult.cpp b/src/core/model/GpgSignResult.cpp
index 4eb28523..8227d46e 100644
--- a/src/core/model/GpgSignResult.cpp
+++ b/src/core/model/GpgSignResult.cpp
@@ -52,7 +52,10 @@ auto GpgSignResult::InvalidSigners()
for (auto* invalid_key = result_ref_->invalid_signers; invalid_key != nullptr;
invalid_key = invalid_key->next) {
try {
- result.emplace_back(QString{invalid_key->fpr}, invalid_key->reason);
+ result.push_back({
+ QString{invalid_key->fpr},
+ invalid_key->reason,
+ });
} catch (...) {
FLOG_W(
"caught exception when processing invalid_signers, "
diff --git a/src/core/model/GpgVerifyResult.cpp b/src/core/model/GpgVerifyResult.cpp
index cd232c02..ca5784d8 100644
--- a/src/core/model/GpgVerifyResult.cpp
+++ b/src/core/model/GpgVerifyResult.cpp
@@ -50,13 +50,13 @@ auto GpgVerifyResult::GetRaw() const -> gpgme_verify_result_t {
}
auto GpgVerifyResult::GetSignature() const -> QContainer<GpgSignature> {
- QContainer<GpgSignature> sigatures;
+ QContainer<GpgSignature> signatures;
auto* signature = result_ref_->signatures;
while (signature != nullptr) {
- sigatures.emplace_back(signature);
+ signatures.push_back(GpgSignature{signature});
signature = signature->next;
}
- return sigatures;
+ return signatures;
}
} // namespace GpgFrontend \ No newline at end of file
diff --git a/src/core/module/GlobalModuleContext.cpp b/src/core/module/GlobalModuleContext.cpp
index 932fcac1..043117e8 100644
--- a/src/core/module/GlobalModuleContext.cpp
+++ b/src/core/module/GlobalModuleContext.cpp
@@ -325,8 +325,8 @@ class GlobalModuleContext::Impl {
return m.has_value() && m->get()->integrated;
}
- auto ListAllRegisteredModuleID() -> QList<ModuleIdentifier> {
- QList<ModuleIdentifier> module_ids;
+ auto ListAllRegisteredModuleID() -> QStringList {
+ QStringList module_ids;
for (const auto& module : module_register_table_) {
module_ids.append(module.first);
}
@@ -334,8 +334,7 @@ class GlobalModuleContext::Impl {
return module_ids;
}
- auto GetModuleListening(const ModuleIdentifier& module_id)
- -> QList<EventIdentifier> {
+ auto GetModuleListening(const ModuleIdentifier& module_id) -> QStringList {
auto module_info = search_module_register_table(module_id);
if (!module_info.has_value()) return {};
return module_info->get()->listening_event_ids;
@@ -464,13 +463,12 @@ auto GlobalModuleContext::IsIntegratedModule(ModuleIdentifier m_id) -> bool {
return p_->IsIntegratedModule(m_id);
}
-auto GlobalModuleContext::ListAllRegisteredModuleID()
- -> QList<ModuleIdentifier> {
+auto GlobalModuleContext::ListAllRegisteredModuleID() -> QStringList {
return p_->ListAllRegisteredModuleID();
}
auto GlobalModuleContext::GetModuleListening(ModuleIdentifier module_id)
- -> QList<EventIdentifier> {
+ -> QStringList {
return p_->GetModuleListening(module_id);
}
diff --git a/src/core/module/GlobalModuleContext.h b/src/core/module/GlobalModuleContext.h
index f122f36f..e0f8e644 100644
--- a/src/core/module/GlobalModuleContext.h
+++ b/src/core/module/GlobalModuleContext.h
@@ -82,13 +82,13 @@ class GPGFRONTEND_CORE_EXPORT GlobalModuleContext : public QObject {
auto SearchEvent(EventTriggerIdentifier) -> std::optional<EventReference>;
- auto GetModuleListening(ModuleIdentifier) -> QList<EventIdentifier>;
+ auto GetModuleListening(ModuleIdentifier) -> QStringList;
auto IsModuleActivated(ModuleIdentifier) -> bool;
auto IsIntegratedModule(ModuleIdentifier) -> bool;
- auto ListAllRegisteredModuleID() -> QList<ModuleIdentifier>;
+ auto ListAllRegisteredModuleID() -> QStringList;
[[nodiscard]] auto GetRegisteredModuleNum() const -> int;
diff --git a/src/core/module/GlobalRegisterTable.cpp b/src/core/module/GlobalRegisterTable.cpp
index ae0d3ee9..4dc6bc7d 100644
--- a/src/core/module/GlobalRegisterTable.cpp
+++ b/src/core/module/GlobalRegisterTable.cpp
@@ -121,7 +121,7 @@ class GlobalRegisterTable::Impl {
current = it.value();
}
- for (auto& key : current->children.keys()) rtn.emplace_back(key);
+ for (auto& key : current->children.keys()) rtn.push_back(key);
}
return rtn;
}
diff --git a/src/core/module/Module.cpp b/src/core/module/Module.cpp
index 1be4a4bd..a77b974d 100644
--- a/src/core/module/Module.cpp
+++ b/src/core/module/Module.cpp
@@ -237,7 +237,7 @@ class Module::Impl {
void** pointer;
};
- QList<Symbol> module_required_symbols_ = {
+ QContainer<Symbol> module_required_symbols_ = {
{"GFGetModuleGFSDKVersion", reinterpret_cast<void**>(&get_sdk_ver_api_)},
{"GFGetModuleQtEnvVersion", reinterpret_cast<void**>(&get_qt_ver_api_)},
{"GFGetModuleID", reinterpret_cast<void**>(&get_id_api_)},
diff --git a/src/core/module/ModuleManager.cpp b/src/core/module/ModuleManager.cpp
index d340a561..0f6a280a 100644
--- a/src/core/module/ModuleManager.cpp
+++ b/src/core/module/ModuleManager.cpp
@@ -133,7 +133,7 @@ class ModuleManager::Impl {
return gmc_->SearchModule(std::move(module_id));
}
- auto ListAllRegisteredModuleID() -> QList<ModuleIdentifier> {
+ auto ListAllRegisteredModuleID() -> QStringList {
return gmc_->ListAllRegisteredModuleID();
}
@@ -176,8 +176,7 @@ class ModuleManager::Impl {
return gmc_->SearchEvent(std::move(trigger_id));
}
- auto GetModuleListening(ModuleIdentifier module_id)
- -> QList<EventIdentifier> {
+ auto GetModuleListening(ModuleIdentifier module_id) -> QStringList {
return gmc_->GetModuleListening(std::move(module_id));
}
@@ -246,7 +245,7 @@ class ModuleManager::Impl {
static ModuleMangerPtr global_module_manager;
SecureUniquePtr<GlobalModuleContext> gmc_;
SecureUniquePtr<GlobalRegisterTable> grt_;
- QList<QLibrary> module_libraries_;
+ QContainer<QLibrary> module_libraries_;
int need_register_modules_ = -1;
};
@@ -300,7 +299,7 @@ void ModuleManager::ListenEvent(ModuleIdentifier module,
}
auto ModuleManager::GetModuleListening(ModuleIdentifier module_id)
- -> QList<EventIdentifier> {
+ -> QStringList {
return p_->GetModuleListening(module_id);
}
@@ -353,7 +352,7 @@ auto ModuleManager::IsIntegratedModule(ModuleIdentifier id) -> bool {
return p_->IsIntegratedModule(id);
}
-auto ModuleManager::ListAllRegisteredModuleID() -> QList<ModuleIdentifier> {
+auto ModuleManager::ListAllRegisteredModuleID() -> QStringList {
return p_->ListAllRegisteredModuleID();
};
diff --git a/src/core/module/ModuleManager.h b/src/core/module/ModuleManager.h
index 3ac35b98..0077fe44 100644
--- a/src/core/module/ModuleManager.h
+++ b/src/core/module/ModuleManager.h
@@ -71,7 +71,7 @@ class GPGFRONTEND_CORE_EXPORT ModuleManager
void SetNeedRegisterModulesNum(int);
- auto ListAllRegisteredModuleID() -> QList<ModuleIdentifier>;
+ auto ListAllRegisteredModuleID() -> QStringList;
void RegisterModule(ModulePtr);
@@ -87,7 +87,7 @@ class GPGFRONTEND_CORE_EXPORT ModuleManager
auto SearchEvent(EventTriggerIdentifier) -> std::optional<EventReference>;
- auto GetModuleListening(ModuleIdentifier) -> QList<EventIdentifier>;
+ auto GetModuleListening(ModuleIdentifier) -> QStringList;
void ActiveModule(ModuleIdentifier);
diff --git a/src/core/struct/settings_object/KeyDatabaseListSO.h b/src/core/struct/settings_object/KeyDatabaseListSO.h
index 3e5e1320..6d9f276d 100644
--- a/src/core/struct/settings_object/KeyDatabaseListSO.h
+++ b/src/core/struct/settings_object/KeyDatabaseListSO.h
@@ -29,11 +29,12 @@
#pragma once
#include "core/struct/settings_object/KeyDatabaseItemSO.h"
+#include "core/typedef/CoreTypedef.h"
namespace GpgFrontend {
struct KeyDatabaseListSO {
- QList<KeyDatabaseItemSO> key_databases;
+ QContainer<KeyDatabaseItemSO> key_databases;
KeyDatabaseListSO() = default;
diff --git a/src/core/utils/GpgUtils.cpp b/src/core/utils/GpgUtils.cpp
index ec0f35e2..c96f523b 100644
--- a/src/core/utils/GpgUtils.cpp
+++ b/src/core/utils/GpgUtils.cpp
@@ -176,10 +176,10 @@ auto SetExtensionOfOutputFileForArchive(const QString& path, GpgOperation opera,
return file_info.absolutePath() + "/" + file_info.baseName();
}
-static QList<KeyDatabaseInfo> gpg_key_database_info_cache;
+static QContainer<KeyDatabaseInfo> gpg_key_database_info_cache;
auto GPGFRONTEND_CORE_EXPORT GetGpgKeyDatabaseInfos()
- -> QList<KeyDatabaseInfo> {
+ -> QContainer<KeyDatabaseInfo> {
if (!gpg_key_database_info_cache.empty()) return gpg_key_database_info_cache;
auto context_index_list = Module::ListRTChildKeys("core", "gpgme.ctx.list");
@@ -300,7 +300,7 @@ auto GetCanonicalKeyDatabasePath(const QDir& app_path,
return {};
}
-auto GetKeyDatabaseInfoBySettings() -> QList<KeyDatabaseInfo> {
+auto GetKeyDatabaseInfoBySettings() -> QContainer<KeyDatabaseInfo> {
auto key_dbs = GetKeyDatabasesBySettings();
QContainer<KeyDatabaseInfo> key_db_infos;
@@ -329,7 +329,7 @@ auto GetKeyDatabaseInfoBySettings() -> QList<KeyDatabaseInfo> {
auto GPGFRONTEND_CORE_EXPORT Convert2RawGpgMEKeyList(
const QContainer<GpgKey>& keys) -> QContainer<gpgme_key_t> {
QContainer<gpgme_key_t> recipients(keys.begin(), keys.end());
- recipients.emplace_back(nullptr);
+ recipients.push_back(nullptr);
return recipients;
}
diff --git a/src/core/utils/GpgUtils.h b/src/core/utils/GpgUtils.h
index 89f3720a..7710f56e 100644
--- a/src/core/utils/GpgUtils.h
+++ b/src/core/utils/GpgUtils.h
@@ -128,22 +128,23 @@ auto GPGFRONTEND_CORE_EXPORT GetKeyDatabasesBySettings()
/**
* @brief
*
- * @return QList<KeyDatabaseInfo>
+ * @return QContainer<KeyDatabaseInfo>
*/
auto GPGFRONTEND_CORE_EXPORT GetKeyDatabaseInfoBySettings()
- -> QList<KeyDatabaseInfo>;
+ -> QContainer<KeyDatabaseInfo>;
/**
* @brief
*
- * @return QList<KeyDatabaseItemSO>
+ * @return QContainer<KeyDatabaseItemSO>
*/
-auto GPGFRONTEND_CORE_EXPORT GetGpgKeyDatabaseInfos() -> QList<KeyDatabaseInfo>;
+auto GPGFRONTEND_CORE_EXPORT GetGpgKeyDatabaseInfos()
+ -> QContainer<KeyDatabaseInfo>;
/**
* @brief
*
- * @return QList<KeyDatabaseItemSO>
+ * @return QContainer<KeyDatabaseItemSO>
*/
auto GPGFRONTEND_CORE_EXPORT GetGpgKeyDatabaseName(int channel) -> QString;