fix: should pass qt5 build
This commit is contained in:
parent
d26401eb9f
commit
597d2c1153
@ -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{});
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user