diff options
author | Trial97 <alexandru.tripon97@gmail.com> | 2023-08-15 12:49:21 +0300 |
---|---|---|
committer | Trial97 <alexandru.tripon97@gmail.com> | 2023-08-15 12:49:21 +0300 |
commit | cf27d2f9ab206e24f7dfd909a88d7db48fd0a74a (patch) | |
tree | 63675a840a90712b8b1468e87569fade7b11deb6 /launcher/ui/pages/modplatform/ResourceModel.cpp | |
parent | b2fdd8359405c93d0d93aa8c68971c986a1f68cb (diff) | |
parent | 8f5bb982cd27dd9158b63d826769c168455a139b (diff) | |
download | PrismLauncher-cf27d2f9ab206e24f7dfd909a88d7db48fd0a74a.tar.gz PrismLauncher-cf27d2f9ab206e24f7dfd909a88d7db48fd0a74a.tar.bz2 PrismLauncher-cf27d2f9ab206e24f7dfd909a88d7db48fd0a74a.zip |
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into download_threads
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Diffstat (limited to 'launcher/ui/pages/modplatform/ResourceModel.cpp')
-rw-r--r-- | launcher/ui/pages/modplatform/ResourceModel.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/launcher/ui/pages/modplatform/ResourceModel.cpp b/launcher/ui/pages/modplatform/ResourceModel.cpp index 9f95d046..464b5fb5 100644 --- a/launcher/ui/pages/modplatform/ResourceModel.cpp +++ b/launcher/ui/pages/modplatform/ResourceModel.cpp @@ -17,7 +17,7 @@ #include "BuildConfig.h" #include "Json.h" -#include "net/Download.h" +#include "net/ApiDownload.h" #include "net/NetJob.h" #include "modplatform/ModIndex.h" @@ -105,7 +105,7 @@ QHash<int, QByteArray> ResourceModel::roleNames() const return roles; } -bool ResourceModel::setData(const QModelIndex& index, const QVariant& value, int role) +bool ResourceModel::setData(const QModelIndex& index, const QVariant& value, [[maybe_unused]] int role) { int pos = index.row(); if (pos >= m_packs.size() || pos < 0 || !index.isValid()) @@ -284,7 +284,7 @@ std::optional<QIcon> ResourceModel::getIcon(QModelIndex& index, const QUrl& url) auto cache_entry = APPLICATION->metacache()->resolveEntry( metaEntryBase(), QString("logos/%1").arg(QString(QCryptographicHash::hash(url.toEncoded(), QCryptographicHash::Algorithm::Sha1).toHex()))); - auto icon_fetch_action = Net::Download::makeCached(url, cache_entry); + auto icon_fetch_action = Net::ApiDownload::makeCached(url, cache_entry); auto full_file_path = cache_entry->getFullPath(); connect(icon_fetch_action.get(), &NetAction::succeeded, this, [=] { @@ -313,7 +313,7 @@ std::optional<QIcon> ResourceModel::getIcon(QModelIndex& index, const QUrl& url) #define NEED_FOR_CALLBACK_ASSERT(name) \ Q_ASSERT_X(0 != 0, #name, "You NEED to re-implement this if you intend on using the default callbacks.") -QJsonArray ResourceModel::documentToArray(QJsonDocument& doc) const +QJsonArray ResourceModel::documentToArray([[maybe_unused]] QJsonDocument& doc) const { NEED_FOR_CALLBACK_ASSERT("documentToArray"); return {}; @@ -375,7 +375,7 @@ void ResourceModel::searchRequestSucceeded(QJsonDocument& doc) endInsertRows(); } -void ResourceModel::searchRequestFailed(QString reason, int network_error_code) +void ResourceModel::searchRequestFailed([[maybe_unused]] QString reason, int network_error_code) { switch (network_error_code) { default: |