| 3 | #include <MMCStrings.h> |
| 4 | |
| 5 | bool JavaCommon::checkJVMArgs(QString jvmargs, QWidget *parent) |
| 6 | { |
| 7 | if (jvmargs.contains("-XX:PermSize=") || jvmargs.contains(QRegExp("-Xm[sx]")) |
| 8 | || jvmargs.contains("-XX-MaxHeapSize") || jvmargs.contains("-XX:InitialHeapSize")) |
| 9 | { |
| 10 | auto warnStr = QObject::tr( |
| 11 | "You tried to manually set a JVM memory option (using \"-XX:PermSize\", \"-XX-MaxHeapSize\", \"-XX:InitialHeapSize\", \"-Xmx\" or \"-Xms\").\n" |
| 12 | "There are dedicated boxes for these in the settings (Java tab, in the Memory group at the top).\n" |
| 13 | "This message will be displayed until you remove them from the JVM arguments."); |
| 14 | CustomMessageBox::selectable( |
| 15 | parent, QObject::tr("JVM arguments warning"), |
| 16 | warnStr, |
| 17 | QMessageBox::Warning)->exec(); |
| 18 | return false; |
| 19 | } |
| 20 | return true; |
| 21 | } |
| 22 | |
| 23 | void JavaCommon::javaWasOk(QWidget *parent, JavaCheckResult result) |
| 24 | { |
nothing calls this directly
no test coverage detected