aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages/modplatform/modrinth
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/ui/pages/modplatform/modrinth')
-rw-r--r--launcher/ui/pages/modplatform/modrinth/ModrinthResourceModels.cpp3
-rw-r--r--launcher/ui/pages/modplatform/modrinth/ModrinthResourceModels.h4
-rw-r--r--launcher/ui/pages/modplatform/modrinth/ModrinthResourcePages.cpp7
3 files changed, 1 insertions, 13 deletions
diff --git a/launcher/ui/pages/modplatform/modrinth/ModrinthResourceModels.cpp b/launcher/ui/pages/modplatform/modrinth/ModrinthResourceModels.cpp
index 895e23fd..06b72fd0 100644
--- a/launcher/ui/pages/modplatform/modrinth/ModrinthResourceModels.cpp
+++ b/launcher/ui/pages/modplatform/modrinth/ModrinthResourceModels.cpp
@@ -23,9 +23,6 @@
namespace ResourceDownload {
-// NOLINTNEXTLINE(modernize-avoid-c-arrays)
-const char* ModrinthModModel::sorts[5]{ "relevance", "downloads", "follows", "updated", "newest" };
-
ModrinthModModel::ModrinthModModel(BaseInstance const& base) : ModModel(base, new ModrinthAPI) {}
void ModrinthModModel::loadIndexedPack(ModPlatform::IndexedPack& m, QJsonObject& obj)
diff --git a/launcher/ui/pages/modplatform/modrinth/ModrinthResourceModels.h b/launcher/ui/pages/modplatform/modrinth/ModrinthResourceModels.h
index 798a70e6..2511f5e5 100644
--- a/launcher/ui/pages/modplatform/modrinth/ModrinthResourceModels.h
+++ b/launcher/ui/pages/modplatform/modrinth/ModrinthResourceModels.h
@@ -41,10 +41,6 @@ class ModrinthModModel : public ModModel {
void loadIndexedPackVersions(ModPlatform::IndexedPack& m, QJsonArray& arr) override;
auto documentToArray(QJsonDocument& obj) const -> QJsonArray override;
-
- // NOLINTNEXTLINE(modernize-avoid-c-arrays)
- static const char* sorts[5];
- inline auto getSorts() const -> const char** override { return sorts; };
};
} // namespace ResourceDownload
diff --git a/launcher/ui/pages/modplatform/modrinth/ModrinthResourcePages.cpp b/launcher/ui/pages/modplatform/modrinth/ModrinthResourcePages.cpp
index 88621e05..45902d16 100644
--- a/launcher/ui/pages/modplatform/modrinth/ModrinthResourcePages.cpp
+++ b/launcher/ui/pages/modplatform/modrinth/ModrinthResourcePages.cpp
@@ -50,12 +50,7 @@ ModrinthModPage::ModrinthModPage(ModDownloadDialog* dialog, BaseInstance& instan
m_model = new ModrinthModModel(instance);
m_ui->packView->setModel(m_model);
- // index is used to set the sorting with the modrinth api
- m_ui->sortByBox->addItem(tr("Sort by Relevance"));
- m_ui->sortByBox->addItem(tr("Sort by Downloads"));
- m_ui->sortByBox->addItem(tr("Sort by Follows"));
- m_ui->sortByBox->addItem(tr("Sort by Last Updated"));
- m_ui->sortByBox->addItem(tr("Sort by Newest"));
+ addSortings();
// sometimes Qt just ignores virtual slots and doesn't work as intended it seems,
// so it's best not to connect them in the parent's constructor...