diff options
author | PandaNinjas <admin@malwarefight.wip.la> | 2023-07-04 16:41:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-04 16:41:34 -0400 |
commit | 4509fde410beab8687d605d0a7fd39038ab94183 (patch) | |
tree | 1835295bdd4a1293a3547f2abef6e0b4cd364278 /launcher/modplatform/helpers/HashUtils.cpp | |
parent | 34cf28712c254ba378bdbf728471d0dfbb4ab58f (diff) | |
parent | dedc9e4edc2769c62f33b6564f3009414245d9f3 (diff) | |
download | PrismLauncher-4509fde410beab8687d605d0a7fd39038ab94183.tar.gz PrismLauncher-4509fde410beab8687d605d0a7fd39038ab94183.tar.bz2 PrismLauncher-4509fde410beab8687d605d0a7fd39038ab94183.zip |
Merge branch 'develop' into fix-implicit-fallthrough
Signed-off-by: PandaNinjas <admin@malwarefight.wip.la>
Diffstat (limited to 'launcher/modplatform/helpers/HashUtils.cpp')
-rw-r--r-- | launcher/modplatform/helpers/HashUtils.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/launcher/modplatform/helpers/HashUtils.cpp b/launcher/modplatform/helpers/HashUtils.cpp index 81c94e1b..6ff1d171 100644 --- a/launcher/modplatform/helpers/HashUtils.cpp +++ b/launcher/modplatform/helpers/HashUtils.cpp @@ -71,6 +71,7 @@ void ModrinthHasher::executeTask() emitFailed("Empty hash!"); } else { emitSucceeded(); + emit resultsReady(m_hash); } } @@ -88,13 +89,13 @@ void FlameHasher::executeTask() emitFailed("Empty hash!"); } else { emitSucceeded(); + emit resultsReady(m_hash); } } - -BlockedModHasher::BlockedModHasher(QString file_path, ModPlatform::ResourceProvider provider) - : Hasher(file_path), provider(provider) { - setObjectName(QString("BlockedModHasher: %1").arg(file_path)); +BlockedModHasher::BlockedModHasher(QString file_path, ModPlatform::ResourceProvider provider) : Hasher(file_path), provider(provider) +{ + setObjectName(QString("BlockedModHasher: %1").arg(file_path)); hash_type = ProviderCaps.hashType(provider).first(); } @@ -120,14 +121,17 @@ void BlockedModHasher::executeTask() emitFailed("Empty hash!"); } else { emitSucceeded(); + emit resultsReady(m_hash); } } -QStringList BlockedModHasher::getHashTypes() { +QStringList BlockedModHasher::getHashTypes() +{ return ProviderCaps.hashType(provider); } -bool BlockedModHasher::useHashType(QString type) { +bool BlockedModHasher::useHashType(QString type) +{ auto types = ProviderCaps.hashType(provider); if (types.contains(type)) { hash_type = type; |