Corected variable name

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97
2023-06-28 13:35:42 +03:00
parent c04cee7ff7
commit 5f1074471d
13 changed files with 32 additions and 32 deletions

View File

@ -199,9 +199,10 @@ void ModrinthPage::onSelectionChanged(QModelIndex curr, QModelIndex prev)
qWarning() << "Error while reading modrinth modpack version: " << e.cause();
}
for (auto version : current.versions) {
auto release_type = version.version_type.isValid() ? QString(" : %1").arg(version.version_type.toString()) : "";
auto release_type = version.version_type.isValid() ? QString(" [%1]").arg(version.version_type.toString()) : "";
if (!version.name.contains(version.version))
ui->versionSelectionBox->addItem(QString("%1 — %2%3").arg(version.name, version.version, release_type), QVariant(version.id));
ui->versionSelectionBox->addItem(QString("%1 — %2%3").arg(version.name, version.version, release_type),
QVariant(version.id));
else
ui->versionSelectionBox->addItem(QString("%1%2").arg(version.name, release_type), QVariant(version.id));
}