chore: fix shadowed member and signed/unsigned mismatch

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: supress unused with [[maybe_unused]]

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: unshadow ^&^& static_cast implicit return

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: deshadow and mark unused in parse task

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: mark unused in folder models

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: deshadow and mark unused with instances

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: more deshadow and unused

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: remove uneeded simicolons

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: mark unused

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: prevent shadow

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
Rachel Powers
2023-06-30 23:51:15 -07:00
parent 98d6904e4a
commit 8d7dcdfc5b
96 changed files with 409 additions and 413 deletions

View File

@ -115,7 +115,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, [[maybe_unused]] int role)
{
int pos = index.row();
if (pos >= modpacks.size() || pos < 0 || !index.isValid())
@ -194,8 +194,6 @@ static auto sortFromIndex(int index) -> QString
case 4:
return "updated";
}
return {};
}
void ModpackListModel::searchWithTerm(const QString& term, const int sort)

View File

@ -105,7 +105,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();
@ -309,9 +309,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;
}

View File

@ -45,7 +45,7 @@ void ModrinthModModel::loadIndexedPackVersions(ModPlatform::IndexedPack& m, QJso
auto ModrinthModModel::loadDependencyVersions(const ModPlatform::Dependency& m, QJsonArray& arr) -> ModPlatform::IndexedVersion
{
return ::Modrinth::loadDependencyVersions(m, arr);
};
}
auto ModrinthModModel::documentToArray(QJsonDocument& obj) const -> QJsonArray
{