fix: should pass qt5 build
Some checks failed
Develop CI Qt5 / build (push) Failing after 1m5s
Develop CI Qt6 / build (push) Failing after 2m22s

This commit is contained in:
saturneric 2024-11-16 19:29:53 +01:00
parent d26401eb9f
commit 597d2c1153
2 changed files with 13 additions and 1 deletions

View File

@ -112,7 +112,7 @@ void GpgKeyOpera::GenerateRevokeCert(const GpgKey& key,
// dealing with reason text
auto reason_text_lines =
GpgFrontend::SecureCreateSharedObject<QList<QString>>(
revocation_reason_text.split('\n', Qt::SkipEmptyParts).toVector());
revocation_reason_text.split('\n', Qt::SkipEmptyParts).toList());
const auto app_path = Module::RetrieveRTValueTypedOrDefault<>(
"core", "gpgme.ctx.app_path", QString{});

View File

@ -60,6 +60,7 @@ struct AllFavoriteKeyPairsCO {
[[nodiscard]] auto ToJson() const -> QJsonObject {
QJsonObject j;
auto j_key_dbs = QJsonArray();
#if QT_VERSION >= QT_VERSION_CHECK(6, 4, 0)
for (const auto& k : key_dbs.asKeyValueRange()) {
QJsonObject o;
o["key_db_name"] = k.first;
@ -69,6 +70,17 @@ struct AllFavoriteKeyPairsCO {
j["key_dbs"] = j_key_dbs;
return j;
}
#else
for (auto it = key_dbs.keyValueBegin(); it != key_dbs.keyValueEnd(); ++it) {
QJsonObject o;
o["key_db_name"] = it->first;
o["key_db"] = it->second.ToJson();
j_key_dbs.append(o);
}
j["key_dbs"] = j_key_dbs;
return j;
}
#endif
};
} // namespace GpgFrontend