Apply suggestions from code review

Co-authored-by: DioEgizio <83089242+DioEgizio@users.noreply.github.com>
Signed-off-by: Alexandru Ionut Tripon <alexandru.tripon97@gmail.com>
This commit is contained in:
Alexandru Ionut Tripon 2024-02-26 22:00:40 +02:00 committed by GitHub
parent 1c96ae5807
commit da96172b0b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 6 additions and 6 deletions

View File

@ -114,7 +114,7 @@ void VersionList::sortVersions()
std::sort(m_vlist.begin(), m_vlist.end(), sortJavas); std::sort(m_vlist.begin(), m_vlist.end(), sortJavas);
} else { } else {
m_vlist = {}; m_vlist = {};
qWarning() << "Your operating system is not yet supported: " << SysInfo::currentSystem() << " " << SysInfo::useQTForArch(); qWarning() << "No Java versions found for your operating system." << SysInfo::currentSystem() << " " << SysInfo::useQTForArch();
} }
endResetModel(); endResetModel();
} }

View File

@ -154,7 +154,7 @@ void JavaPage::on_javaDetectBtn_clicked()
ui->javaPathTextBox->setText(java->path); ui->javaPathTextBox->setText(java->path);
if (!java->is_64bit && APPLICATION->settings()->get("MaxMemAlloc").toInt() > 2048) { if (!java->is_64bit && APPLICATION->settings()->get("MaxMemAlloc").toInt() > 2048) {
CustomMessageBox::selectable(this, tr("Confirm Selection"), CustomMessageBox::selectable(this, tr("Confirm Selection"),
tr("You selected an x86 java version.\n" tr("You selected a 32 bit java version.\n"
"This means that will not support more than 2048MiB of RAM.\n" "This means that will not support more than 2048MiB of RAM.\n"
"Please make sure that the maximum memory value is lower."), "Please make sure that the maximum memory value is lower."),
QMessageBox::Warning, QMessageBox::Ok, QMessageBox::Ok) QMessageBox::Warning, QMessageBox::Ok, QMessageBox::Ok)

View File

@ -416,7 +416,7 @@ void InstanceSettingsPage::on_javaDetectBtn_clicked()
if (!java->is_64bit && m_settings->get("MaxMemAlloc").toInt() > 2048) { if (!java->is_64bit && m_settings->get("MaxMemAlloc").toInt() > 2048) {
CustomMessageBox::selectable(this, tr("Confirm Selection"), CustomMessageBox::selectable(this, tr("Confirm Selection"),
tr("You selected an x86 java version.\n" tr("You selected a 32 bit java version.\n"
"This means that will not support more than 2048MiB of RAM.\n" "This means that will not support more than 2048MiB of RAM.\n"
"Please make sure that the maximum memory value is lower."), "Please make sure that the maximum memory value is lower."),
QMessageBox::Warning, QMessageBox::Ok, QMessageBox::Ok) QMessageBox::Warning, QMessageBox::Ok, QMessageBox::Ok)

View File

@ -173,8 +173,8 @@ void JavaSettingsWidget::initialize()
updateThresholds(); updateThresholds();
auto button = CustomMessageBox::selectable(this, tr("Auto Java Download"), auto button = CustomMessageBox::selectable(this, tr("Auto Java Download"),
tr("%1 has now the ability to auto downloand the correct java for each minecraft version.\n" tr("%1 can automatically download the correct Java version for each version of Minecraft..\n"
"Do you want to enable java auto-download?\n") "Do you want to enable Java auto-download?\n")
.arg(BuildConfig.LAUNCHER_DISPLAYNAME), .arg(BuildConfig.LAUNCHER_DISPLAYNAME),
QMessageBox::Warning, QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes) QMessageBox::Warning, QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)
->exec(); ->exec();
@ -505,7 +505,7 @@ void JavaSettingsWidget::updateThresholds()
} else if (observedMaxMemory > 2048 && m_result.is_64bit) { } else if (observedMaxMemory > 2048 && m_result.is_64bit) {
iconName = "status-bad"; iconName = "status-bad";
m_labelMaxMemIcon->setToolTip( m_labelMaxMemIcon->setToolTip(
tr("Your maximum memory allocation exceeds selected java possible memory(due to x86 application limitations).")); tr("Because you're using 32 bit Java, you're exceeding the maximum possible allocation."));
} else { } else {
iconName = "status-good"; iconName = "status-good";
m_labelMaxMemIcon->setToolTip(""); m_labelMaxMemIcon->setToolTip("");