forked from qt-creator/qt-creator
PerfProfiler: Remove PerfProfilerRunner::start() reimplementation
Move the code into c'tor. Change-Id: Ic7132f985890dc70fe6144934cef4fe4dd4ec308 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -126,15 +126,12 @@ public:
|
|||||||
m_perfParserWorker->addStartDependency(m_perfRecordWorker);
|
m_perfParserWorker->addStartDependency(m_perfRecordWorker);
|
||||||
m_perfParserWorker->addStopDependency(m_perfRecordWorker);
|
m_perfParserWorker->addStopDependency(m_perfRecordWorker);
|
||||||
PerfProfilerTool::instance()->onWorkerCreation(runControl);
|
PerfProfilerTool::instance()->onWorkerCreation(runControl);
|
||||||
}
|
|
||||||
|
|
||||||
void start() final
|
|
||||||
{
|
|
||||||
auto tool = PerfProfilerTool::instance();
|
auto tool = PerfProfilerTool::instance();
|
||||||
connect(tool->stopAction(), &QAction::triggered, runControl(), &RunControl::initiateStop);
|
connect(tool->stopAction(), &QAction::triggered, runControl, &RunControl::initiateStop);
|
||||||
connect(runControl(), &RunControl::started, PerfProfilerTool::instance(),
|
connect(runControl, &RunControl::started, PerfProfilerTool::instance(),
|
||||||
&PerfProfilerTool::onRunControlStarted);
|
&PerfProfilerTool::onRunControlStarted);
|
||||||
connect(runControl(), &RunControl::stopped, PerfProfilerTool::instance(),
|
connect(runControl, &RunControl::stopped, PerfProfilerTool::instance(),
|
||||||
&PerfProfilerTool::onRunControlFinished);
|
&PerfProfilerTool::onRunControlFinished);
|
||||||
|
|
||||||
PerfDataReader *reader = m_perfParserWorker->reader();
|
PerfDataReader *reader = m_perfParserWorker->reader();
|
||||||
@@ -143,8 +140,6 @@ public:
|
|||||||
if (!reader->feedParser(data))
|
if (!reader->feedParser(data))
|
||||||
reportFailure(Tr::tr("Failed to transfer Perf data to perfparser."));
|
reportFailure(Tr::tr("Failed to transfer Perf data to perfparser."));
|
||||||
});
|
});
|
||||||
|
|
||||||
reportStarted();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Reference in New Issue
Block a user