NOISSUE Use MiB suffix for Java memory options

This commit is contained in:
Jamie Mansfield 2021-06-23 09:55:09 +01:00
parent 27d3ae145a
commit d8598d6901
No known key found for this signature in database
GPG Key ID: 36F61598F39F67B0
6 changed files with 11 additions and 11 deletions

View File

@ -37,8 +37,8 @@ JavaPage::JavaPage(QWidget *parent) : QWidget(parent), ui(new Ui::JavaPage)
ui->setupUi(this);
ui->tabWidget->tabBar()->hide();
auto sysMB = Sys::getSystemRam() / Sys::megabyte;
ui->maxMemSpinBox->setMaximum(sysMB);
auto sysMiB = Sys::getSystemRam() / Sys::mebibyte;
ui->maxMemSpinBox->setMaximum(sysMiB);
loadSettings();
}

View File

@ -51,7 +51,7 @@
<string>The maximum amount of memory Minecraft is allowed to use.</string>
</property>
<property name="suffix">
<string notr="true"> MB</string>
<string notr="true"> MiB</string>
</property>
<property name="minimum">
<number>128</number>
@ -87,7 +87,7 @@
<string>The amount of memory Minecraft is started with.</string>
</property>
<property name="suffix">
<string notr="true"> MB</string>
<string notr="true"> MiB</string>
</property>
<property name="minimum">
<number>128</number>
@ -116,7 +116,7 @@
<string>The amount of memory available to store loaded Java classes.</string>
</property>
<property name="suffix">
<string notr="true"> MB</string>
<string notr="true"> MiB</string>
</property>
<property name="minimum">
<number>64</number>

View File

@ -19,7 +19,7 @@ InstanceSettingsPage::InstanceSettingsPage(BaseInstance *inst, QWidget *parent)
{
m_settings = inst->settings();
ui->setupUi(this);
auto sysMB = Sys::getSystemRam() / Sys::megabyte;
auto sysMB = Sys::getSystemRam() / Sys::mebibyte;
ui->maxMemSpinBox->setMaximum(sysMB);
connect(ui->openGlobalJavaSettingsButton, &QCommandLinkButton::clicked, this, &InstanceSettingsPage::globalSettingsButtonClicked);
connect(MMC, &MultiMC::globalSettingsAboutToOpen, this, &InstanceSettingsPage::applySettings);

View File

@ -116,7 +116,7 @@
<string>The maximum amount of memory Minecraft is allowed to use.</string>
</property>
<property name="suffix">
<string notr="true"> MB</string>
<string notr="true"> MiB</string>
</property>
<property name="minimum">
<number>128</number>
@ -138,7 +138,7 @@
<string>The amount of memory Minecraft is started with.</string>
</property>
<property name="suffix">
<string notr="true"> MB</string>
<string notr="true"> MiB</string>
</property>
<property name="minimum">
<number>128</number>
@ -160,7 +160,7 @@
<string>The amount of memory available to store loaded Java classes.</string>
</property>
<property name="suffix">
<string notr="true"> MB</string>
<string notr="true"> MiB</string>
</property>
<property name="minimum">
<number>64</number>

View File

@ -19,7 +19,7 @@
JavaSettingsWidget::JavaSettingsWidget(QWidget* parent) : QWidget(parent)
{
m_availableMemory = Sys::getSystemRam() / Sys::megabyte;
m_availableMemory = Sys::getSystemRam() / Sys::mebibyte;
goodIcon = MMC->getThemedIcon("status-good");
yellowIcon = MMC->getThemedIcon("status-yellow");

View File

@ -3,7 +3,7 @@
namespace Sys
{
const uint64_t megabyte = 1024ull * 1024ull;
const uint64_t mebibyte = 1024ull * 1024ull;
struct KernelInfo
{
QString kernelName;