QmlProfiler: Adapt QmlProfilerRunControlFactory to Analyzer changes

Change-Id: I8047cdb3fc65df2139c1a5770218c48e83ef5f5a
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
This commit is contained in:
hjk
2016-01-19 17:25:18 +01:00
parent e214eda80e
commit 5dad96e3b7
8 changed files with 108 additions and 118 deletions

View File

@@ -26,6 +26,7 @@
#include "qmlprofilerruncontrol.h"
#include "localqmlprofilerrunner.h"
#include "qmlprofilertool.h"
#include <analyzerbase/analyzermanager.h>
#include <coreplugin/icore.h>
@@ -61,6 +62,7 @@ namespace QmlProfiler {
class QmlProfilerRunControl::QmlProfilerRunControlPrivate
{
public:
Internal::QmlProfilerTool *m_tool = 0;
QmlProfilerStateManager *m_profilerState = 0;
QTimer m_noDebugOutputTimer;
QmlDebug::QmlOutputParser m_outputParser;
@@ -71,10 +73,12 @@ public:
// QmlProfilerRunControl
//
QmlProfilerRunControl::QmlProfilerRunControl(RunConfiguration *runConfiguration)
QmlProfilerRunControl::QmlProfilerRunControl(RunConfiguration *runConfiguration,
Internal::QmlProfilerTool *tool)
: AnalyzerRunControl(runConfiguration, ProjectExplorer::Constants::QML_PROFILER_RUN_MODE)
, d(new QmlProfilerRunControlPrivate)
{
d->m_tool = tool;
// Only wait 4 seconds for the 'Waiting for connection' on application output, then just try to connect
// (application output might be redirected / blocked)
d->m_noDebugOutputTimer.setSingleShot(true);
@@ -248,6 +252,11 @@ void QmlProfilerRunControl::registerProfilerStateManager( QmlProfilerStateManage
this, &QmlProfilerRunControl::profilerStateChanged);
}
void QmlProfilerRunControl::finalizeSetup()
{
d->m_tool->finalizeRunControl(this);
}
void QmlProfilerRunControl::profilerStateChanged()
{
switch (d->m_profilerState->currentState()) {