Fix more stuff. Detached tools, only MCEdit for now.

This commit is contained in:
Jan Dalheimer
2014-02-16 10:46:14 +01:00
parent 994972bf5d
commit 616c372690
17 changed files with 307 additions and 44 deletions

View File

@@ -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));
}