forked from qt-creator/qt-creator
Debugger: Make perspective toolbar items part of the perspective
This simplifies the toolbar setup and removes the need for the stack of toolbar widgets. The actions themselves have been owned by the plugin already, so nothing changed in this respect. Change-Id: I44754e16c8fc2acc53633dd9d560b1e732eece27 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -271,7 +271,6 @@ ClangTidyClazyTool::ClangTidyClazyTool()
|
||||
|
||||
auto perspective = new Perspective(tr("Clang-Tidy and Clazy"));
|
||||
perspective->addWindow(m_diagnosticView, Perspective::SplitVertical, nullptr);
|
||||
Debugger::registerPerspective(ClangTidyClazyPerspectiveId, perspective);
|
||||
|
||||
action = new QAction(tr("Clang-Tidy and Clazy..."), this);
|
||||
action->setToolTip(toolTip);
|
||||
@@ -283,14 +282,14 @@ ClangTidyClazyTool::ClangTidyClazyTool()
|
||||
action->setEnabled(m_startAction->isEnabled());
|
||||
});
|
||||
|
||||
ToolbarDescription tidyClazyToolbar;
|
||||
tidyClazyToolbar.addAction(m_startAction);
|
||||
tidyClazyToolbar.addAction(m_stopAction);
|
||||
tidyClazyToolbar.addAction(m_goBack);
|
||||
tidyClazyToolbar.addAction(m_goNext);
|
||||
tidyClazyToolbar.addWidget(m_filterLineEdit);
|
||||
tidyClazyToolbar.addWidget(m_applyFixitsButton);
|
||||
Debugger::registerToolbar(ClangTidyClazyPerspectiveId, tidyClazyToolbar);
|
||||
perspective->addToolbarAction(m_startAction);
|
||||
perspective->addToolbarAction(m_stopAction);
|
||||
perspective->addToolbarAction(m_goBack);
|
||||
perspective->addToolbarAction(m_goNext);
|
||||
perspective->addToolbarWidget(m_filterLineEdit);
|
||||
perspective->addToolbarWidget(m_applyFixitsButton);
|
||||
|
||||
Debugger::registerPerspective(ClangTidyClazyPerspectiveId, perspective);
|
||||
|
||||
updateRunActions();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user