diff --git a/src/plugins/perfprofiler/perfprofilertool.cpp b/src/plugins/perfprofiler/perfprofilertool.cpp index 5af097a9ec0..bb71f925dae 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);