diff options
author | Alessandro Portale <alessandro.portale@theqtcompany.com> | 2016-03-31 13:32:08 +0200 |
---|---|---|
committer | Alessandro Portale <alessandro.portale@theqtcompany.com> | 2016-03-31 11:47:28 +0000 |
commit | 52a6e03942bd76b0812e8d9efc471c6ec6abcaf5 (patch) | |
tree | df1e412d4f9cbf5f03e98f29ba6ab077507e6ef6 /src/plugins/valgrind/callgrindtool.cpp | |
parent | eeb566ef74005181c32882fc611433d0f5694b47 (diff) |
Valgrind: Fix callgrind's "Cost format" button
Broke after 0a89b89065b633cfb4f5dc8c9fd38240b38e53a8
Correct fix seems to me to avoid the whole menu.
Change-Id: I59f1eb859c9045fc5ae9ac1b377b7e69b29af7ae
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/valgrind/callgrindtool.cpp')
-rw-r--r-- | src/plugins/valgrind/callgrindtool.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/plugins/valgrind/callgrindtool.cpp b/src/plugins/valgrind/callgrindtool.cpp index 2fbb4958de..246fe18883 100644 --- a/src/plugins/valgrind/callgrindtool.cpp +++ b/src/plugins/valgrind/callgrindtool.cpp @@ -412,7 +412,6 @@ CallgrindTool::CallgrindTool(QObject *parent) // Cost formatting { - auto menu = new QMenu; auto group = new QActionGroup(this); // Show costs as absolute numbers @@ -422,7 +421,6 @@ CallgrindTool::CallgrindTool(QObject *parent) m_costAbsolute->setChecked(true); connect(m_costAbsolute, &QAction::toggled, this, &CallgrindTool::updateCostFormat); group->addAction(m_costAbsolute); - menu->addAction(m_costAbsolute); // Show costs in percentages m_costRelative = new QAction(tr("Relative Costs"), this); @@ -430,7 +428,6 @@ CallgrindTool::CallgrindTool(QObject *parent) m_costRelative->setCheckable(true); connect(m_costRelative, &QAction::toggled, this, &CallgrindTool::updateCostFormat); group->addAction(m_costRelative); - menu->addAction(m_costRelative); // Show costs relative to parent m_costRelativeToParent = new QAction(tr("Relative Costs to Parent"), this); @@ -438,11 +435,9 @@ CallgrindTool::CallgrindTool(QObject *parent) m_costRelativeToParent->setCheckable(true); connect(m_costRelativeToParent, &QAction::toggled, this, &CallgrindTool::updateCostFormat); group->addAction(m_costRelativeToParent); - menu->addAction(m_costRelativeToParent); auto button = new QToolButton; - button->setMenu(menu); - menu->setParent(button); + button->addActions(group->actions()); button->setPopupMode(QToolButton::InstantPopup); button->setText(QLatin1String("$")); button->setToolTip(tr("Cost Format")); |