diff options
Diffstat (limited to 'logic/profiler/BaseProfiler.cpp')
-rw-r--r-- | logic/profiler/BaseProfiler.cpp | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/logic/profiler/BaseProfiler.cpp b/logic/profiler/BaseProfiler.cpp index b58e88be..9aaca793 100644 --- a/logic/profiler/BaseProfiler.cpp +++ b/logic/profiler/BaseProfiler.cpp @@ -1,16 +1,9 @@ #include "BaseProfiler.h" #include <QProcess> -#ifdef Q_OS_WIN -#include <windows.h> -#endif BaseProfiler::BaseProfiler(BaseInstance *instance, QObject *parent) - : QObject(parent), m_instance(instance) -{ -} - -BaseProfiler::~BaseProfiler() + : BaseExternalTool(instance, parent) { } @@ -36,16 +29,7 @@ void BaseProfiler::abortProfilingImpl() emit abortLaunch(tr("Profiler aborted")); } -qint64 BaseProfiler::pid(QProcess *process) -{ -#ifdef Q_OS_WIN - struct _PROCESS_INFORMATION *procinfo = process->pid(); - return procinfo->dwProcessId; -#else - return process->pid(); -#endif -} - -BaseProfilerFactory::~BaseProfilerFactory() +BaseProfiler *BaseProfilerFactory::createProfiler(BaseInstance *instance, QObject *parent) { + return qobject_cast<BaseProfiler *>(createTool(instance, parent)); } |