mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-12-14 04:32:14 +00:00
Fix stuff. Make sure different ways of aborting profiling work.
This commit is contained in:
@@ -22,7 +22,16 @@ void JProfiler::beginProfilingImpl(MinecraftProcess *process)
|
||||
.absoluteFilePath("bin/jpenable"));
|
||||
connect(profiler, &QProcess::started, [this, port]()
|
||||
{ emit readyToLaunch(tr("Listening on port: %1").arg(port)); });
|
||||
connect(profiler, SIGNAL(finished(int)), profiler, SLOT(deleteLater()));
|
||||
connect(profiler,
|
||||
static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished),
|
||||
[this](int exit, QProcess::ExitStatus status)
|
||||
{
|
||||
if (exit != 0 || status == QProcess::CrashExit)
|
||||
{
|
||||
emit abortLaunch(tr("Profiler aborted"));
|
||||
}
|
||||
m_profilerProcess->deleteLater();
|
||||
});
|
||||
profiler->start();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user