From 29e92e4dda540aea4629219314f6841f6ef06353 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 25 Jun 2019 14:31:27 +0200 Subject: 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 --- src/plugins/perfprofiler/perfprofilertool.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/plugins/perfprofiler') diff --git a/src/plugins/perfprofiler/perfprofilertool.cpp b/src/plugins/perfprofiler/perfprofilertool.cpp index 5af097a9ec..bb71f925da 100644 --- a/src/plugins/perfprofiler/perfprofilertool.cpp +++ b/src/plugins/perfprofiler/perfprofilertool.cpp @@ -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); -- cgit v1.2.1