chore: reformat

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
Sefa Eyeoglu
2023-08-14 18:16:53 +02:00
parent 779f70057b
commit 91ba4cf75e
603 changed files with 15840 additions and 16257 deletions

View File

@ -117,7 +117,7 @@ auto ModpackListModel::data(const QModelIndex& index, int role) const -> QVarian
return {};
}
bool ModpackListModel::setData(const QModelIndex &index, const QVariant &value, [[maybe_unused]] int role)
bool ModpackListModel::setData(const QModelIndex& index, const QVariant& value, [[maybe_unused]] int role)
{
int pos = index.row();
if (pos >= modpacks.size() || pos < 0 || !index.isValid())
@ -183,24 +183,24 @@ 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";
}
}
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);