QmlJSEditor: Minor cleanup

Remove unneeded variable, and connect directly to member functions.

Change-Id: I2c5077676fc8d3f975d03a71b3e566b692e6b7c6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Orgad Shaneh
2016-06-29 08:25:13 +03:00
committed by Orgad Shaneh
parent 943c76f4ab
commit b6bc52065c

View File

@@ -57,10 +57,10 @@ void QmlJSOutlineTreeView::contextMenuEvent(QContextMenuEvent *event)
QMenu contextMenu;
QAction *action = contextMenu.addAction(tr("Expand All"));
connect(action, &QAction::triggered, this, [this] () { expandAll(); });
action = contextMenu.addAction(tr("Collapse All"));
connect(action, &QAction::triggered, this, [this] () { collapseAllExceptRoot(); });
connect(contextMenu.addAction(tr("Expand All")), &QAction::triggered,
this, &QmlJSOutlineTreeView::expandAll);
connect(contextMenu.addAction(tr("Collapse All")), &QAction::triggered,
this, &QmlJSOutlineTreeView::collapseAllExceptRoot);
contextMenu.exec(event->globalPos());