More fixes.

This commit is contained in:
Jan Dalheimer
2014-02-16 09:30:38 +01:00
parent 82b35b5445
commit 994972bf5d
4 changed files with 17 additions and 6 deletions

View File

@@ -16,7 +16,7 @@ void JVisualVM::beginProfilingImpl(MinecraftProcess *process)
{
QProcess *profiler = new QProcess(this);
profiler->setArguments(QStringList() << "--openpid" << QString::number(pid(process)));
profiler->setProgram("jvisualvm");
profiler->setProgram(MMC->settings()->get("JVisualVMPath").toString());
connect(profiler, &QProcess::started, [this]()
{ emit readyToLaunch(tr("JVisualVM started")); });
connect(profiler,
@@ -27,7 +27,11 @@ void JVisualVM::beginProfilingImpl(MinecraftProcess *process)
{
emit abortLaunch(tr("Profiler aborted"));
}
m_profilerProcess->deleteLater();
if (m_profilerProcess)
{
m_profilerProcess->deleteLater();
m_profilerProcess = 0;
}
});
profiler->start();
m_profilerProcess = profiler;