diff options
author | saturneric <[email protected]> | 2024-01-12 06:02:37 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-01-12 06:02:37 +0000 |
commit | bf538056b24a68b8fd235b1c50991ee8eb46a776 (patch) | |
tree | e1bab54095b80df62b321fb5bd69453f9f951b05 /src/core/function/KeyPackageOperator.h | |
parent | feat: improve api and ui of keys import and export (diff) | |
download | GpgFrontend-bf538056b24a68b8fd235b1c50991ee8eb46a776.tar.gz GpgFrontend-bf538056b24a68b8fd235b1c50991ee8eb46a776.zip |
refactor: use QString instead of std::string and improve threading system
Diffstat (limited to 'src/core/function/KeyPackageOperator.h')
-rw-r--r-- | src/core/function/KeyPackageOperator.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/core/function/KeyPackageOperator.h b/src/core/function/KeyPackageOperator.h index 0bc51eff..abfb59b6 100644 --- a/src/core/function/KeyPackageOperator.h +++ b/src/core/function/KeyPackageOperator.h @@ -29,6 +29,7 @@ #pragma once #include "core/function/gpg/GpgKeyImportExporter.h" +#include "core/typedef/CoreTypedef.h" namespace GpgFrontend { @@ -47,14 +48,14 @@ class GPGFRONTEND_CORE_EXPORT KeyPackageOperator { * @return false if passphrase was not generated and saved */ static auto GeneratePassphrase(const std::filesystem::path &phrase_path, - std::string &phrase) -> bool; + QString &phrase) -> bool; /** * @brief generate the name of the key package * - * @return std::string name of the key package + * @return QString name of the key package */ - static auto GenerateKeyPackageName() -> std::string; + static auto GenerateKeyPackageName() -> QString; /** * @brief generate key package @@ -68,8 +69,8 @@ class GPGFRONTEND_CORE_EXPORT KeyPackageOperator { * @return false if key package was not generated */ static void GenerateKeyPackage(const std::filesystem::path &key_package_path, - const std::string &key_package_name, - const KeyArgsList &keys, std::string &phrase, + const QString &key_package_name, + const KeyArgsList &keys, QString &phrase, bool secret, const OperationCallback &cb); /** @@ -89,8 +90,8 @@ class GPGFRONTEND_CORE_EXPORT KeyPackageOperator { /** * @brief generate key package name * - * @return std::string key package name + * @return QString key package name */ - static auto generate_key_package_name() -> std::string; + static auto generate_key_package_name() -> QString; }; } // namespace GpgFrontend |