aboutsummaryrefslogtreecommitdiff
path: root/launcher/modplatform/helpers/HashUtils.cpp
diff options
context:
space:
mode:
authorRachel Powers <508861+Ryex@users.noreply.github.com>2023-06-25 12:36:27 -0700
committerRachel Powers <508861+Ryex@users.noreply.github.com>2023-06-25 12:43:48 -0700
commitdf4fd7df7f98589c5dba85e4b5cdf0179a77faf5 (patch)
treeb382b0375a12d91305849f5dad41f4e0b04de8df /launcher/modplatform/helpers/HashUtils.cpp
parentc8ff812ab89044890d88779e33f3c6f86c4b8f74 (diff)
parent1bd778d0ae27b3e87b800f773d5bc35708060c19 (diff)
downloadPrismLauncher-df4fd7df7f98589c5dba85e4b5cdf0179a77faf5.tar.gz
PrismLauncher-df4fd7df7f98589c5dba85e4b5cdf0179a77faf5.tar.bz2
PrismLauncher-df4fd7df7f98589c5dba85e4b5cdf0179a77faf5.zip
Merge remote-tracking branch 'upstream/develop' into refactor/net-split-headers-to-proxy-class
Diffstat (limited to 'launcher/modplatform/helpers/HashUtils.cpp')
-rw-r--r--launcher/modplatform/helpers/HashUtils.cpp16
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;