Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into refactor/NetActions

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97
2023-08-05 19:21:37 +03:00
640 changed files with 16963 additions and 17090 deletions

View File

@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
/*
* PolyMC - Minecraft Launcher
* Prism Launcher - Minecraft Launcher
* Copyright (c) 2022 flowln <flowlnlnln@gmail.com>
* Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net>
*
@@ -117,7 +117,7 @@ auto ModpackListModel::data(const QModelIndex& index, int role) const -> QVarian
return {};
}
bool ModpackListModel::setData(const QModelIndex &index, const QVariant &value, int role)
bool ModpackListModel::setData(const QModelIndex& index, const QVariant& value, int role)
{
int pos = index.row();
if (pos >= modpacks.size() || pos < 0 || !index.isValid())
@@ -183,18 +183,18 @@ void ModpackListModel::refresh()
static auto sortFromIndex(int index) -> QString
{
switch(index){
default:
case 0:
return "relevance";
case 1:
return "downloads";
case 2:
return "follows";
case 3:
return "newest";
case 4:
return "updated";
switch (index) {
default:
case 0:
return "relevance";
case 1:
return "downloads";
case 2:
return "follows";
case 3:
return "newest";
case 4:
return "updated";
}
return {};
@@ -202,7 +202,7 @@ static auto sortFromIndex(int index) -> QString
void ModpackListModel::searchWithTerm(const QString& term, const int sort)
{
if(sort > 5 || sort < 0)
if (sort > 5 || sort < 0)
return;
auto sort_str = sortFromIndex(sort);