Added some warnings

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97 2023-06-24 01:05:49 +03:00
parent 31aaa6d1da
commit cf94adb363
No known key found for this signature in database
GPG key ID: 55EF5DA53DB36318
10 changed files with 158 additions and 37 deletions

View file

@ -70,11 +70,18 @@ auto ProviderCapabilities::hash(ResourceProvider p, QIODevice* device, QString t
}
QCryptographicHash hash(algo);
if(!hash.addData(device))
if (!hash.addData(device))
qCritical() << "Failed to read JAR to create hash!";
Q_ASSERT(hash.result().length() == hash.hashLength(algo));
return { hash.result().toHex() };
}
QString getMetaURL(ResourceProvider provider, QString slug)
{
return ((provider == ModPlatform::ResourceProvider::FLAME) ? "https://www.curseforge.com/minecraft/mc-mods/"
: "https://modrinth.com/mod/") +
slug.remove(".pw.toml");
}
} // namespace ModPlatform