aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/utils/GpgUtils.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-12-02 17:10:01 +0000
committersaturneric <[email protected]>2024-12-02 19:32:59 +0000
commit0b5131cd895f6c4f7fc21af6740d03952a2463af (patch)
tree18d3eeac659e18346aa1477a318c47fecc094c0c /src/core/utils/GpgUtils.cpp
parenttranslations: update zh_CN and de_DE (diff)
downloadGpgFrontend-0b5131cd895f6c4f7fc21af6740d03952a2463af.tar.gz
GpgFrontend-0b5131cd895f6c4f7fc21af6740d03952a2463af.zip
fix: qt5 build issues
Diffstat (limited to 'src/core/utils/GpgUtils.cpp')
-rw-r--r--src/core/utils/GpgUtils.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/utils/GpgUtils.cpp b/src/core/utils/GpgUtils.cpp
index 8d337d66..957b8910 100644
--- a/src/core/utils/GpgUtils.cpp
+++ b/src/core/utils/GpgUtils.cpp
@@ -179,8 +179,13 @@ auto GPGFRONTEND_CORE_EXPORT GetGpgKeyDatabaseInfos()
if (!gpg_key_database_info_cache.empty()) return gpg_key_database_info_cache;
auto context_index_list = Module::ListRTChildKeys("core", "gpgme.ctx.list");
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
gpg_key_database_info_cache.resize(
static_cast<qsizetype>(context_index_list.size()));
+#else
+ gpg_key_database_info_cache.reserve(
+ static_cast<qsizetype>(context_index_list.size()));
+#endif
for (auto& context_index : context_index_list) {
LOG_D() << "context grt key: " << context_index;