Fix type conversion error in older Qt versions

This commit is contained in:
Janek Bevendorff
2018-01-07 22:59:59 +01:00
committed by Jonathan White
parent df728083cc
commit c51585c279

View File

@@ -65,16 +65,16 @@ QSharedPointer<Kdf> KeePass2::kdfFromParameters(const QVariantMap &p)
{
QByteArray uuidBytes = p.value(KDFPARAM_UUID).toByteArray();
if (uuidBytes.size() != Uuid::Length) {
return nullptr;
return {};
}
QSharedPointer<Kdf> kdf(uuidToKdf(Uuid(uuidBytes)));
if (kdf.isNull()) {
return nullptr;
return {};
}
if (!kdf->processParameters(p)) {
return nullptr;
return {};
}
return kdf;
@@ -95,7 +95,7 @@ QSharedPointer<Kdf> KeePass2::uuidToKdf(const Uuid& uuid)
}
Q_ASSERT_X(false, "uuidToKdf", "Invalid UUID");
return nullptr;
return {};
}
KeePass2::ProtectedStreamAlgo KeePass2::idToProtectedStreamAlgo(quint32 id)