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);

View File

@@ -556,7 +556,7 @@ MemcheckTool::MemcheckTool()
m_errorView->setObjectName(QLatin1String("Valgrind.MemcheckTool.ErrorView"));
m_errorView->setWindowTitle(tr("Memory Issues"));
auto perspective = new Perspective(tr("Memcheck"));
auto perspective = new Perspective(MemcheckPerspectiveId, tr("Memcheck"));
perspective->addWindow(m_errorView, Perspective::SplitVertical, nullptr);
connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::updateRunActions,
@@ -690,7 +690,7 @@ MemcheckTool::MemcheckTool()
perspective->addToolbarAction(m_goBack);
perspective->addToolbarAction(m_goNext);
perspective->addToolbarWidget(filterButton);
Debugger::registerPerspective(MemcheckPerspectiveId, perspective);
Debugger::registerPerspective(perspective);
updateFromSettings();
maybeActiveRunConfigurationChanged();