NOISSUE Use MiB suffix for Java memory options
This commit is contained in:
parent
27d3ae145a
commit
d8598d6901
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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);
|
||||
|
@ -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>
|
||||
|
@ -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");
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
namespace Sys
|
||||
{
|
||||
const uint64_t megabyte = 1024ull * 1024ull;
|
||||
const uint64_t mebibyte = 1024ull * 1024ull;
|
||||
struct KernelInfo
|
||||
{
|
||||
QString kernelName;
|
||||
|
Loading…
Reference in New Issue
Block a user