From dd6af4efab11b0c1c4344bcb780abf1701b51511 Mon Sep 17 00:00:00 2001 From: Sky Date: Wed, 6 Nov 2013 01:18:47 +0000 Subject: [PATCH] Nag for instance specific JVM args too --- gui/MainWindow.cpp | 4 ++-- gui/dialogs/InstanceSettings.cpp | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp index cf4a7124..62ae195b 100644 --- a/gui/MainWindow.cpp +++ b/gui/MainWindow.cpp @@ -535,7 +535,7 @@ void MainWindow::instanceActivated(QModelIndex index) BaseInstance *inst = (BaseInstance *)index.data(InstanceList::InstancePointerRole).value(); - NagUtils::checkJVMArgs(MMC->settings()->get("JvmArgs").toString(), this); + NagUtils::checkJVMArgs(inst->settings().get("JvmArgs").toString(), this); bool autoLogin = inst->settings().get("AutoLogin").toBool(); if (autoLogin) @@ -548,7 +548,7 @@ void MainWindow::on_actionLaunchInstance_triggered() { if (m_selectedInstance) { - NagUtils::checkJVMArgs(MMC->settings()->get("JvmArgs").toString(), this); + NagUtils::checkJVMArgs(m_selectedInstance->settings().get("JvmArgs").toString(), this); doLogin(); } } diff --git a/gui/dialogs/InstanceSettings.cpp b/gui/dialogs/InstanceSettings.cpp index a3269878..add135b4 100644 --- a/gui/dialogs/InstanceSettings.cpp +++ b/gui/dialogs/InstanceSettings.cpp @@ -20,6 +20,7 @@ #include "InstanceSettings.h" #include "ui_InstanceSettings.h" #include "gui/Platform.h" +#include "logic/NagUtils.h" InstanceSettings::InstanceSettings(SettingsObject *obj, QWidget *parent) : m_obj(obj), QDialog(parent), ui(new Ui::InstanceSettings) @@ -123,6 +124,8 @@ void InstanceSettings::applySettings() { m_obj->set("JavaPath", ui->javaPathTextBox->text()); m_obj->set("JvmArgs", ui->jvmArgsTextBox->text()); + + NagUtils::checkJVMArgs(m_obj->get("JvmArgs").toString(), this->parentWidget()); } else {