diff options
author | saturneric <[email protected]> | 2025-01-26 18:40:43 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2025-01-26 18:40:43 +0000 |
commit | 731ec7339dc6f251a814d4aef59c05b1900ecf3f (patch) | |
tree | 3c0abf0dafb81578c97c0c9d169acbff99cb94d0 /src/core/function | |
parent | fix: optimums unknown fpr verifying helper (diff) | |
download | GpgFrontend-731ec7339dc6f251a814d4aef59c05b1900ecf3f.tar.gz GpgFrontend-731ec7339dc6f251a814d4aef59c05b1900ecf3f.zip |
fix: improve code compatibility
Diffstat (limited to 'src/core/function')
-rw-r--r-- | src/core/function/gpg/GpgKeyManager.cpp | 7 | ||||
-rw-r--r-- | src/core/function/gpg/GpgKeyOpera.cpp | 11 | ||||
-rw-r--r-- | src/core/function/gpg/GpgUIDOperator.cpp | 11 | ||||
-rw-r--r-- | src/core/function/result_analyse/GpgVerifyResultAnalyse.h | 2 |
4 files changed, 6 insertions, 25 deletions
diff --git a/src/core/function/gpg/GpgKeyManager.cpp b/src/core/function/gpg/GpgKeyManager.cpp index 674a3884..afa775eb 100644 --- a/src/core/function/gpg/GpgKeyManager.cpp +++ b/src/core/function/gpg/GpgKeyManager.cpp @@ -271,13 +271,8 @@ auto GpgKeyManager::RevokeSubkey(const GpgKey& key, int subkey_index, } // dealing with reason text -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 4) - auto reason_text_lines = SecureCreateSharedObject<QList<QString>>( + auto reason_text_lines = SecureCreateSharedObject<QStringList>( reason_text.split('\n', Qt::SkipEmptyParts).toVector()); -#else - auto reason_text_lines = SecureCreateSharedObject<QVector<QString>>( - reason_text.split('\n', Qt::SkipEmptyParts).toVector()); -#endif 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 92a969ae..800a6708 100644 --- a/src/core/function/gpg/GpgKeyOpera.cpp +++ b/src/core/function/gpg/GpgKeyOpera.cpp @@ -112,15 +112,8 @@ void GpgKeyOpera::GenerateRevokeCert(const GpgKey& key, << "text:" << revocation_reason_text; // dealing with reason text -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 4) - auto reason_text_lines = - GpgFrontend::SecureCreateSharedObject<QList<QString>>( - revocation_reason_text.split('\n', Qt::SkipEmptyParts).toVector()); -#else - auto reason_text_lines = - GpgFrontend::SecureCreateSharedObject<QVector<QString>>( - revocation_reason_text.split('\n', Qt::SkipEmptyParts).toVector()); -#endif + auto reason_text_lines = GpgFrontend::SecureCreateSharedObject<QStringList>( + revocation_reason_text.split('\n', Qt::SkipEmptyParts).toVector()); const auto app_path = Module::RetrieveRTValueTypedOrDefault<>( "core", "gpgme.ctx.app_path", QString{}); diff --git a/src/core/function/gpg/GpgUIDOperator.cpp b/src/core/function/gpg/GpgUIDOperator.cpp index 3fc506f4..e87a710d 100644 --- a/src/core/function/gpg/GpgUIDOperator.cpp +++ b/src/core/function/gpg/GpgUIDOperator.cpp @@ -155,15 +155,8 @@ auto GpgUIDOperator::RevokeUID(const GpgKey& key, int uid_index, } // dealing with reason text -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 4) - auto reason_text_lines = - GpgFrontend::SecureCreateSharedObject<QList<QString>>( - reason_text.split('\n', Qt::SkipEmptyParts).toVector()); -#else - auto reason_text_lines = - GpgFrontend::SecureCreateSharedObject<QVector<QString>>( - reason_text.split('\n', Qt::SkipEmptyParts).toVector()); -#endif + auto reason_text_lines = GpgFrontend::SecureCreateSharedObject<QStringList>( + reason_text.split('\n', Qt::SkipEmptyParts).toVector()); AutomatonNextStateHandler next_state_handler = [](AutomatonState state, QString status, diff --git a/src/core/function/result_analyse/GpgVerifyResultAnalyse.h b/src/core/function/result_analyse/GpgVerifyResultAnalyse.h index b5f681ab..719bb107 100644 --- a/src/core/function/result_analyse/GpgVerifyResultAnalyse.h +++ b/src/core/function/result_analyse/GpgVerifyResultAnalyse.h @@ -65,7 +65,7 @@ class GPGFRONTEND_CORE_EXPORT GpgVerifyResultAnalyse : public GpgResultAnalyse { /** * @brief Get the Unknown Signatures object * - * @return QList<QString> + * @return QStringList */ [[nodiscard]] auto GetUnknownSignatures() const -> QStringList; |