aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/utils/GpgUtils.cpp
diff options
context:
space:
mode:
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;