ProjectExplorer: Split Target and ToolRunners into smaller tasks

This increases re-usability of activities like 'port gathering',
and makes their use less dependent on actual device implementations.

Change-Id: I017cb74874f2b38c487ba2d03906a675d5618647
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2017-05-09 10:25:11 +02:00
parent 9b93d5a330
commit 89f02cba2c
56 changed files with 1270 additions and 1843 deletions

View File

@@ -67,7 +67,6 @@ namespace QmlProfiler {
class QmlProfilerRunControl::QmlProfilerRunControlPrivate
{
public:
Internal::QmlProfilerTool *m_tool = 0;
QmlProfilerStateManager *m_profilerState = 0;
QTimer m_noDebugOutputTimer;
};
@@ -76,15 +75,13 @@ public:
// QmlProfilerRunControl
//
QmlProfilerRunControl::QmlProfilerRunControl(RunConfiguration *runConfiguration,
Internal::QmlProfilerTool *tool)
QmlProfilerRunControl::QmlProfilerRunControl(RunConfiguration *runConfiguration)
: RunControl(runConfiguration, ProjectExplorer::Constants::QML_PROFILER_RUN_MODE)
, d(new QmlProfilerRunControlPrivate)
{
setIcon(ProjectExplorer::Icons::ANALYZER_START_SMALL_TOOLBAR);
setSupportsReRunning(false);
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);
@@ -104,7 +101,7 @@ QmlProfilerRunControl::~QmlProfilerRunControl()
void QmlProfilerRunControl::start()
{
reportApplicationStart();
d->m_tool->finalizeRunControl(this);
Internal::QmlProfilerTool::instance()->finalizeRunControl(this);
QTC_ASSERT(d->m_profilerState, reportApplicationStop(); return);
QTC_ASSERT(connection().is<AnalyzerConnection>(), reportApplicationStop(); return);