QmlProfiler: Separate out LocalQmlProfilerRunner from engine

Change-Id: I6f9245179090bebb98b6d9849a7a696105e43a3a
Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
This commit is contained in:
Aurindam Jana
2013-07-19 16:13:10 +02:00
parent c57160eda6
commit d53609d27b
6 changed files with 116 additions and 97 deletions

View File

@@ -35,9 +35,13 @@
#include <utils/environment.h>
#include <projectexplorer/applicationlauncher.h>
namespace ProjectExplorer { class RunConfiguration; }
namespace Analyzer { class AnalyzerStartParameters; }
namespace QmlProfiler {
namespace Internal {
class QmlProfilerEngine;
class LocalQmlProfilerRunner : public AbstractQmlProfilerRunner
{
Q_OBJECT
@@ -51,7 +55,11 @@ public:
Utils::Environment environment;
};
explicit LocalQmlProfilerRunner(const Configuration &configuration, QObject *parent = 0);
static LocalQmlProfilerRunner *createLocalRunner(ProjectExplorer::RunConfiguration *runConfiguration,
const Analyzer::AnalyzerStartParameters &sp,
QString *errorMessage,
QmlProfilerEngine *engine);
~LocalQmlProfilerRunner();
// AbstractQmlProfilerRunner
@@ -59,14 +67,16 @@ public:
virtual void stop();
virtual quint16 debugPort() const;
bool hasExecutable() const { return !m_configuration.executable.isEmpty(); }
private slots:
void spontaneousStop(int exitCode);
private:
LocalQmlProfilerRunner(const Configuration &configuration, QmlProfilerEngine *engine);
private:
Configuration m_configuration;
ProjectExplorer::ApplicationLauncher m_launcher;
QmlProfilerEngine *m_engine;
};
} // namespace Internal