diff options
author | Jan Dalheimer <jan@dalheimer.de> | 2014-02-16 10:46:14 +0100 |
---|---|---|
committer | Jan Dalheimer <jan@dalheimer.de> | 2014-02-16 10:46:14 +0100 |
commit | 616c37269053bc4f111792dbb9374cc119a58339 (patch) | |
tree | 7ac3bc3bbec628593473bc87ffcec9acf24e990b /logic/profiler/BaseProfiler.cpp | |
parent | 994972bf5da5584186e6e82c36287afeb6c1e23a (diff) | |
download | MultiMC-616c37269053bc4f111792dbb9374cc119a58339.tar MultiMC-616c37269053bc4f111792dbb9374cc119a58339.tar.gz MultiMC-616c37269053bc4f111792dbb9374cc119a58339.tar.lz MultiMC-616c37269053bc4f111792dbb9374cc119a58339.tar.xz MultiMC-616c37269053bc4f111792dbb9374cc119a58339.zip |
Fix more stuff. Detached tools, only MCEdit for now.
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)); } |