PerfProfiler: Connect the updateRunActions() signal earlier

The startup project can get enabled before we create the views. In that
case we miss an update and the run button stays disabled.

Fixes: QTCREATORBUG-22616
Change-Id: I5af9075a4899a5dd0e5f69c13348510cde47285d
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Ulf Hermann
2019-06-25 14:31:27 +02:00
parent d97e677be4
commit 29e92e4dda

View File

@@ -157,6 +157,9 @@ PerfProfilerTool::PerfProfilerTool()
tracePointsAction->setEnabled(m_startAction->isEnabled());
});
connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::updateRunActions,
this, &PerfProfilerTool::updateRunActions);
m_recordButton = new QToolButton;
m_clearButton = new QToolButton;
m_filterButton = new QToolButton;
@@ -341,9 +344,6 @@ void PerfProfilerTool::createViews()
menu1->exec(m_flameGraphView->mapToGlobal(pos));
});
connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::updateRunActions,
this, &PerfProfilerTool::updateRunActions);
m_perspective.addToolBarAction(m_startAction);
m_perspective.addToolBarAction(m_stopAction);
m_perspective.addToolBarWidget(m_recordButton);