Nag for instance specific JVM args too

This commit is contained in:
Sky 2013-11-06 01:18:47 +00:00
parent 51dee3745f
commit dd6af4efab
2 changed files with 5 additions and 2 deletions

View File

@ -535,7 +535,7 @@ void MainWindow::instanceActivated(QModelIndex index)
BaseInstance *inst =
(BaseInstance *)index.data(InstanceList::InstancePointerRole).value<void *>();
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();
}
}

View File

@ -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
{