pollymc/logic/tools/BaseProfiler.cpp

36 lines
732 B
C++
Raw Normal View History

#include "BaseProfiler.h"
2014-02-15 22:45:41 +05:30
#include <QProcess>
2015-02-09 06:21:14 +05:30
BaseProfiler::BaseProfiler(SettingsObjectPtr settings, InstancePtr instance, QObject *parent)
: BaseExternalTool(settings, instance, parent)
{
}
2015-01-28 03:01:07 +05:30
void BaseProfiler::beginProfiling(BaseProcess *process)
{
beginProfilingImpl(process);
}
void BaseProfiler::abortProfiling()
{
2014-02-16 14:00:38 +05:30
abortProfilingImpl();
}
void BaseProfiler::abortProfilingImpl()
{
if (!m_profilerProcess)
{
return;
}
m_profilerProcess->terminate();
m_profilerProcess->deleteLater();
2014-02-16 14:00:38 +05:30
m_profilerProcess = 0;
emit abortLaunch(tr("Profiler aborted"));
}
2014-03-30 23:41:05 +05:30
BaseProfiler *BaseProfilerFactory::createProfiler(InstancePtr instance, QObject *parent)
{
return qobject_cast<BaseProfiler *>(createTool(instance, parent));
}