refactor: use QIODevice instead of a whole QByteArray for hash calc.

This allows Qt to do its thing and optimize the data gathering from the
JAR.

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow
2022-07-23 23:11:09 -03:00
parent 0e473f4570
commit cfda8dbb2b
2 changed files with 18 additions and 22 deletions

View File

@ -24,6 +24,8 @@
#include <QVariant>
#include <QVector>
class QIODevice;
namespace ModPlatform {
enum class Provider {
@ -36,7 +38,7 @@ class ProviderCapabilities {
auto name(Provider) -> const char*;
auto readableName(Provider) -> QString;
auto hashType(Provider) -> QStringList;
auto hash(Provider, QByteArray&, QString type = "") -> QByteArray;
auto hash(Provider, QIODevice*, QString type = "") -> QString;
};
struct ModpackAuthor {