From 82b35b5445d88d67c89c6547b24053d31dc35b9c Mon Sep 17 00:00:00 2001 From: Jan Dalheimer Date: Sun, 16 Feb 2014 08:54:52 +0100 Subject: Fix stuff. Make sure different ways of aborting profiling work. --- logic/profiler/BaseProfiler.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'logic/profiler/BaseProfiler.cpp') diff --git a/logic/profiler/BaseProfiler.cpp b/logic/profiler/BaseProfiler.cpp index 4765c67d..1a377818 100644 --- a/logic/profiler/BaseProfiler.cpp +++ b/logic/profiler/BaseProfiler.cpp @@ -19,6 +19,21 @@ void BaseProfiler::beginProfiling(MinecraftProcess *process) beginProfilingImpl(process); } +void BaseProfiler::abortProfiling() +{ + abortProfiling(); +} + +void BaseProfiler::abortProfilingImpl() +{ + if (!m_profilerProcess) + { + return; + } + m_profilerProcess->terminate(); + m_profilerProcess->deleteLater(); +} + qint64 BaseProfiler::pid(QProcess *process) { #ifdef Q_OS_WIN -- cgit