mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-03 03:46:58 +03:00
Restructure
This commit is contained in:
parent
f26b7dedad
commit
9c87bc6c4b
14 changed files with 18 additions and 18 deletions
35
logic/tools/BaseProfiler.cpp
Normal file
35
logic/tools/BaseProfiler.cpp
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
#include "BaseProfiler.h"
|
||||
|
||||
#include <QProcess>
|
||||
|
||||
BaseProfiler::BaseProfiler(BaseInstance *instance, QObject *parent)
|
||||
: BaseExternalTool(instance, parent)
|
||||
{
|
||||
}
|
||||
|
||||
void BaseProfiler::beginProfiling(MinecraftProcess *process)
|
||||
{
|
||||
beginProfilingImpl(process);
|
||||
}
|
||||
|
||||
void BaseProfiler::abortProfiling()
|
||||
{
|
||||
abortProfilingImpl();
|
||||
}
|
||||
|
||||
void BaseProfiler::abortProfilingImpl()
|
||||
{
|
||||
if (!m_profilerProcess)
|
||||
{
|
||||
return;
|
||||
}
|
||||
m_profilerProcess->terminate();
|
||||
m_profilerProcess->deleteLater();
|
||||
m_profilerProcess = 0;
|
||||
emit abortLaunch(tr("Profiler aborted"));
|
||||
}
|
||||
|
||||
BaseProfiler *BaseProfilerFactory::createProfiler(BaseInstance *instance, QObject *parent)
|
||||
{
|
||||
return qobject_cast<BaseProfiler *>(createTool(instance, parent));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue