diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2023-08-15 10:36:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-15 10:36:09 +0200 |
commit | 4b06255cc26933379107745d95f72097737d2a9b (patch) | |
tree | 60e00c8389bb2d8e4be492531beb788a253d1b6a /launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp | |
parent | 3aba7f8fec45c7c87be486d8f6b5c96f69facf93 (diff) | |
parent | 1939e3e6ed3d2d2d4199d90154333cc8892eafeb (diff) | |
download | PrismLauncher-4b06255cc26933379107745d95f72097737d2a9b.tar.gz PrismLauncher-4b06255cc26933379107745d95f72097737d2a9b.tar.bz2 PrismLauncher-4b06255cc26933379107745d95f72097737d2a9b.zip |
Merge pull request #1486 from PrismLauncher/staging
Diffstat (limited to 'launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp')
-rw-r--r-- | launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp b/launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp index 31b05030..41fd5003 100644 --- a/launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp +++ b/launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp @@ -46,6 +46,8 @@ #include "ui/widgets/ProjectItem.h" +#include "net/ApiDownload.h" + #include <QComboBox> #include <QKeyEvent> #include <QPushButton> @@ -105,7 +107,7 @@ bool ModrinthPage::eventFilter(QObject* watched, QEvent* event) return QObject::eventFilter(watched, event); } -void ModrinthPage::onSelectionChanged(QModelIndex curr, QModelIndex prev) +void ModrinthPage::onSelectionChanged(QModelIndex curr, [[maybe_unused]] QModelIndex prev) { ui->versionSelectionBox->clear(); @@ -127,7 +129,7 @@ void ModrinthPage::onSelectionChanged(QModelIndex curr, QModelIndex prev) QString id = current.id; - netJob->addNetAction(Net::Download::makeByteArray(QString("%1/project/%2").arg(BuildConfig.MODRINTH_PROD_URL, id), response)); + netJob->addNetAction(Net::ApiDownload::makeByteArray(QString("%1/project/%2").arg(BuildConfig.MODRINTH_PROD_URL, id), response)); QObject::connect(netJob, &NetJob::succeeded, this, [this, response, id, curr] { if (id != current.id) { @@ -176,7 +178,7 @@ void ModrinthPage::onSelectionChanged(QModelIndex curr, QModelIndex prev) QString id = current.id; netJob->addNetAction( - Net::Download::makeByteArray(QString("%1/project/%2/version").arg(BuildConfig.MODRINTH_PROD_URL, id), response)); + Net::ApiDownload::makeByteArray(QString("%1/project/%2/version").arg(BuildConfig.MODRINTH_PROD_URL, id), response)); QObject::connect(netJob, &NetJob::succeeded, this, [this, response, id, curr] { if (id != current.id) { @@ -309,9 +311,9 @@ void ModrinthPage::triggerSearch() m_model->searchWithTerm(ui->searchEdit->text(), ui->sortByBox->currentIndex()); } -void ModrinthPage::onVersionSelectionChanged(QString data) +void ModrinthPage::onVersionSelectionChanged(QString version) { - if (data.isNull() || data.isEmpty()) { + if (version.isNull() || version.isEmpty()) { selectedVersion = ""; return; } |