mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Fix type conversion error in older Qt versions
This commit is contained in:
parent
df728083cc
commit
c51585c279
@ -65,16 +65,16 @@ QSharedPointer<Kdf> KeePass2::kdfFromParameters(const QVariantMap &p)
|
|||||||
{
|
{
|
||||||
QByteArray uuidBytes = p.value(KDFPARAM_UUID).toByteArray();
|
QByteArray uuidBytes = p.value(KDFPARAM_UUID).toByteArray();
|
||||||
if (uuidBytes.size() != Uuid::Length) {
|
if (uuidBytes.size() != Uuid::Length) {
|
||||||
return nullptr;
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
QSharedPointer<Kdf> kdf(uuidToKdf(Uuid(uuidBytes)));
|
QSharedPointer<Kdf> kdf(uuidToKdf(Uuid(uuidBytes)));
|
||||||
if (kdf.isNull()) {
|
if (kdf.isNull()) {
|
||||||
return nullptr;
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!kdf->processParameters(p)) {
|
if (!kdf->processParameters(p)) {
|
||||||
return nullptr;
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
return kdf;
|
return kdf;
|
||||||
@ -95,7 +95,7 @@ QSharedPointer<Kdf> KeePass2::uuidToKdf(const Uuid& uuid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Q_ASSERT_X(false, "uuidToKdf", "Invalid UUID");
|
Q_ASSERT_X(false, "uuidToKdf", "Invalid UUID");
|
||||||
return nullptr;
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
KeePass2::ProtectedStreamAlgo KeePass2::idToProtectedStreamAlgo(quint32 id)
|
KeePass2::ProtectedStreamAlgo KeePass2::idToProtectedStreamAlgo(quint32 id)
|
||||||
|
Loading…
Reference in New Issue
Block a user