Debugger: Tighten Perspective interface

Pass id in constructor, so it can be const.

Change-Id: Id33fe19c4416109af8aa05a3ed0a09918eeb5cdf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2018-08-13 09:34:47 +02:00
parent 1d68e08359
commit 1567679b81
8 changed files with 49 additions and 64 deletions

View File

@@ -419,7 +419,7 @@ CallgrindTool::CallgrindTool()
this, &CallgrindTool::setCostEvent);
updateEventCombo();
auto perspective = new Perspective(tr("Callgrind"));
auto perspective = new Perspective(CallgrindPerspectiveId, tr("Callgrind"));
perspective->addToolbarAction(m_startAction);
perspective->addToolbarAction(m_stopAction);
perspective->addToolbarAction(m_loadExternalLogFile);
@@ -510,7 +510,7 @@ CallgrindTool::CallgrindTool()
perspective->addWindow(m_callersView, Perspective::SplitHorizontal, m_calleesView);
perspective->addWindow(m_visualization, Perspective::SplitVertical, nullptr,
false, Qt::RightDockWidgetArea);
Debugger::registerPerspective(CallgrindPerspectiveId, perspective);
Debugger::registerPerspective(perspective);
connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::updateRunActions,
this, &CallgrindTool::updateRunActions);