summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2017-04-30 15:12:46 +0200
committerPetr Mrázek <peterix@gmail.com>2017-04-30 15:12:46 +0200
commitf06ac02396c8dfd002db80453963cb61bddce080 (patch)
treed1e6a3cf4de3676d901d31977f51682f9791ae48 /application
parent794102b32cb9b9c0ddb0c8268c572acb256dd6ba (diff)
downloadMultiMC-f06ac02396c8dfd002db80453963cb61bddce080.tar
MultiMC-f06ac02396c8dfd002db80453963cb61bddce080.tar.gz
MultiMC-f06ac02396c8dfd002db80453963cb61bddce080.tar.lz
MultiMC-f06ac02396c8dfd002db80453963cb61bddce080.tar.xz
MultiMC-f06ac02396c8dfd002db80453963cb61bddce080.zip
NOISSUE block use of "-XX-MaxHeapSize" and "-XX:InitialHeapSize" java args.
Synonyms for "-Xms" and "-Xmx" that I missed originally. These are ALWAYS managed by MultiMC. Do not touch them.
Diffstat (limited to 'application')
-rw-r--r--application/JavaCommon.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/application/JavaCommon.cpp b/application/JavaCommon.cpp
index bb7246f7..0008fc04 100644
--- a/application/JavaCommon.cpp
+++ b/application/JavaCommon.cpp
@@ -4,18 +4,16 @@
bool JavaCommon::checkJVMArgs(QString jvmargs, QWidget *parent)
{
- if (jvmargs.contains("-XX:PermSize=") || jvmargs.contains(QRegExp("-Xm[sx]")))
+ if (jvmargs.contains("-XX:PermSize=") || jvmargs.contains(QRegExp("-Xm[sx]"))
+ || jvmargs.contains("-XX-MaxHeapSize") || jvmargs.contains("-XX:InitialHeapSize"))
{
+ auto warnStr = QObject::tr(
+ "You tried to manually set a JVM memory option (using \"-XX:PermSize\", \"-XX-MaxHeapSize\", \"-XX:InitialHeapSize\", \"-Xmx\" or \"-Xms\").\n"
+ "There are dedicated boxes for these in the settings (Java tab, in the Memory group at the top).\n"
+ "This message will be displayed until you remove them from the JVM arguments.");
CustomMessageBox::selectable(
parent, QObject::tr("JVM arguments warning"),
- QObject::tr("You tried to manually set a JVM memory option (using "
- " \"-XX:PermSize\", \"-Xmx\" or \"-Xms\") - there"
- " are dedicated boxes for these in the settings (Java"
- " tab, in the Memory group at the top).\n"
- "Your manual settings will be overridden by the"
- " dedicated options.\n"
- "This message will be displayed until you remove them"
- " from the JVM arguments."),
+ warnStr,
QMessageBox::Warning)->exec();
return false;
}
@@ -102,3 +100,4 @@ void JavaCommon::TestCheck::checkFinishedWithArgs(JavaCheckResult result)
javaArgsWereBad(m_parent, result);
emit finished();
}
+