Added some warnings
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
31aaa6d1da
commit
cf94adb363
10 changed files with 158 additions and 37 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue