forked from qt-creator/qt-creator
Debugger: Return created tool button from Perspective::addAction
It will be needed later to show/hide the buttons depending on engine-specific abilities or other circumstances. Change-Id: I029012e01929e5e96e2af87da2cf3580a8d82b3f Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -455,12 +455,13 @@ QList<QWidget *> ToolbarDescription::widgets() const
|
||||
return m_widgets;
|
||||
}
|
||||
|
||||
void ToolbarDescription::addAction(QAction *action, const QIcon &toolbarIcon)
|
||||
QToolButton *ToolbarDescription::addAction(QAction *action, const QIcon &toolbarIcon)
|
||||
{
|
||||
auto button = new QToolButton;
|
||||
button->setDefaultAction(toolbarIcon.isNull()
|
||||
? action : ProxyAction::proxyActionWithIcon(action, toolbarIcon));
|
||||
m_widgets.append(button);
|
||||
return button;
|
||||
}
|
||||
|
||||
void ToolbarDescription::addWidget(QWidget *widget)
|
||||
|
@@ -105,7 +105,7 @@ public:
|
||||
|
||||
QList<QWidget *> widgets() const;
|
||||
|
||||
void addAction(QAction *action, const QIcon &toolbarIcon = QIcon());
|
||||
QToolButton *addAction(QAction *action, const QIcon &toolbarIcon = QIcon());
|
||||
void addWidget(QWidget *widget);
|
||||
|
||||
private:
|
||||
|
Reference in New Issue
Block a user