diff --git a/launcher/ui/pages/modplatform/ResourcePage.cpp b/launcher/ui/pages/modplatform/ResourcePage.cpp index 80258946c..2c2f97b77 100644 --- a/launcher/ui/pages/modplatform/ResourcePage.cpp +++ b/launcher/ui/pages/modplatform/ResourcePage.cpp @@ -325,9 +325,9 @@ void ResourcePage::onSelectionChanged(QModelIndex curr, [[maybe_unused]] QModelI updateUi(); } -void ResourcePage::onVersionSelectionChanged(int) +void ResourcePage::onVersionSelectionChanged(int index) { - m_selectedVersionIndex = m_ui->versionSelectionBox->currentData().toInt(); + m_selectedVersionIndex = m_ui->versionSelectionBox->itemData(index).toInt(); updateSelectionButton(); } @@ -364,10 +364,10 @@ void ResourcePage::onResourceSelected() auto& version = current_pack->versions[m_selectedVersionIndex]; if (version.downloadUrl.isNull()) { - CustomMessageBox::selectable(this, tr("How?"), - "You managed to select a resource that doesn't have a download link. Because of this missing " - "information prism will not try to download it.", - QMessageBox::Warning) + CustomMessageBox::selectable( + this, tr("Download Link Missing"), + tr("It looks like the resource you selected doesn't have a download link, so Prism won't attempt to download it."), + QMessageBox::Warning) ->show(); return; } @@ -485,7 +485,7 @@ void ResourcePage::openProject(QVariant projectID) m_ui->gridLayout_4->addWidget(buttonBox, 1, 2); connect(m_ui->versionSelectionBox, QOverload::of(&QComboBox::currentIndexChanged), this, - [this, okBtn] { okBtn->setEnabled(m_ui->versionSelectionBox->currentData().toInt() >= 0); }); + [this, okBtn](int index) { okBtn->setEnabled(m_ui->versionSelectionBox->itemData(index).toInt() >= 0); }); auto jump = [this] { for (int row = 0; row < m_model->rowCount({}); row++) { diff --git a/launcher/ui/pages/modplatform/flame/FlamePage.cpp b/launcher/ui/pages/modplatform/flame/FlamePage.cpp index 9abf4a9c6..de6b3d633 100644 --- a/launcher/ui/pages/modplatform/flame/FlamePage.cpp +++ b/launcher/ui/pages/modplatform/flame/FlamePage.cpp @@ -273,7 +273,7 @@ void FlamePage::suggestCurrent() void FlamePage::onVersionSelectionChanged(int index) { bool is_blocked = false; - ui->versionSelectionBox->currentData().toInt(&is_blocked); + ui->versionSelectionBox->itemData(index).toInt(&is_blocked); if (index == -1 || is_blocked) { m_selected_version_index = -1; diff --git a/launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp b/launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp index 8803c6dd9..7d70abec4 100644 --- a/launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp +++ b/launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp @@ -375,7 +375,7 @@ void ModrinthPage::onVersionSelectionChanged(int index) selectedVersion = ""; return; } - selectedVersion = ui->versionSelectionBox->currentData().toString(); + selectedVersion = ui->versionSelectionBox->itemData(index).toString(); suggestCurrent(); } diff --git a/launcher/ui/widgets/ThemeCustomizationWidget.cpp b/launcher/ui/widgets/ThemeCustomizationWidget.cpp index 7a54bd390..097678b8d 100644 --- a/launcher/ui/widgets/ThemeCustomizationWidget.cpp +++ b/launcher/ui/widgets/ThemeCustomizationWidget.cpp @@ -87,7 +87,7 @@ void ThemeCustomizationWidget::applyIconTheme(int index) { auto settings = APPLICATION->settings(); auto originalIconTheme = settings->get("IconTheme").toString(); - auto newIconTheme = ui->iconsComboBox->currentData().toString(); + auto newIconTheme = ui->iconsComboBox->itemData(index).toString(); if (originalIconTheme != newIconTheme) { settings->set("IconTheme", newIconTheme); APPLICATION->themeManager()->applyCurrentlySelectedTheme(); @@ -100,7 +100,7 @@ void ThemeCustomizationWidget::applyWidgetTheme(int index) { auto settings = APPLICATION->settings(); auto originalAppTheme = settings->get("ApplicationTheme").toString(); - auto newAppTheme = ui->widgetStyleComboBox->currentData().toString(); + auto newAppTheme = ui->widgetStyleComboBox->itemData(index).toString(); if (originalAppTheme != newAppTheme) { settings->set("ApplicationTheme", newAppTheme); APPLICATION->themeManager()->applyCurrentlySelectedTheme(); @@ -113,7 +113,7 @@ void ThemeCustomizationWidget::applyCatTheme(int index) { auto settings = APPLICATION->settings(); auto originalCat = settings->get("BackgroundCat").toString(); - auto newCat = ui->backgroundCatComboBox->currentData().toString(); + auto newCat = ui->backgroundCatComboBox->itemData(index).toString(); if (originalCat != newCat) { settings->set("BackgroundCat", newCat); }