diff options
author | glowiak <52356948+glowiak@users.noreply.github.com> | 2022-02-16 18:36:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-16 18:36:28 +0100 |
commit | 45f89c625533b7e65b70aab1d96ae6eddcbe9051 (patch) | |
tree | 546fcf5723ead2d0d793c490d15d53f50c4e8c9c /launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp | |
parent | b1cf77e84780ce8b88599cde2e878a21019365d9 (diff) | |
parent | 2cd837896dc66344b53141325d76bcb045036abf (diff) | |
download | PrismLauncher-45f89c625533b7e65b70aab1d96ae6eddcbe9051.tar.gz PrismLauncher-45f89c625533b7e65b70aab1d96ae6eddcbe9051.tar.bz2 PrismLauncher-45f89c625533b7e65b70aab1d96ae6eddcbe9051.zip |
Merge branch 'develop' into patch-1
Diffstat (limited to 'launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp')
-rw-r--r-- | launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp b/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp index 71574156..5a18830a 100644 --- a/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp +++ b/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp @@ -3,12 +3,14 @@ #include "minecraft/MinecraftInstance.h" #include "minecraft/PackProfile.h" #include "ModrinthPage.h" +#include "ui/dialogs/ModDownloadDialog.h" #include <Json.h> #include <MMCStrings.h> #include <Version.h> #include <QtMath> +#include <QMessageBox> namespace Modrinth { @@ -250,6 +252,12 @@ void Modrinth::ListModel::searchRequestFinished() void Modrinth::ListModel::searchRequestFailed(QString reason) { + if(jobPtr->first()->m_reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt() == 409){ + //409 Gone, notify user to update + QMessageBox::critical(nullptr, tr("Error"), tr("Modrinth API version too old!\nPlease update PolyMC!")); + //self-destruct + ((ModDownloadDialog *)((ModrinthPage *)parent())->parentWidget())->reject(); + } jobPtr.reset(); if(searchState == ResetRequested) { |