forked from qt-creator/qt-creator
Debugger: Fix passing tooltips from to toolbuttons
Visible in the O and <> buttons of the Callgrind toolbar. Change-Id: I1016f853335bfc243f7e934e7a0cd430922c8af6 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -1324,6 +1324,7 @@ QAction *BoolAspect::action()
|
||||
auto act = BaseAspect::action(); // Creates it.
|
||||
act->setCheckable(true);
|
||||
act->setChecked(value());
|
||||
act->setToolTip(toolTip());
|
||||
connect(act, &QAction::triggered, this, [this](bool newValue) {
|
||||
// The check would be nice to have in simple conditions, but if we
|
||||
// have an action that's used both on a settings page and as action
|
||||
|
||||
@@ -834,6 +834,7 @@ QToolButton *PerspectivePrivate::setupToolButton(QAction *action)
|
||||
auto toolButton = new QToolButton(m_innerToolBar);
|
||||
toolButton->setProperty("panelwidget", true);
|
||||
toolButton->setDefaultAction(action);
|
||||
toolButton->setToolTip(action->toolTip());
|
||||
m_innerToolBarLayout->addWidget(toolButton);
|
||||
return toolButton;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user