forked from qt-creator/qt-creator
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:
committed by
Orgad Shaneh
parent
943c76f4ab
commit
b6bc52065c
@@ -57,10 +57,10 @@ void QmlJSOutlineTreeView::contextMenuEvent(QContextMenuEvent *event)
|
|||||||
|
|
||||||
QMenu contextMenu;
|
QMenu contextMenu;
|
||||||
|
|
||||||
QAction *action = contextMenu.addAction(tr("Expand All"));
|
connect(contextMenu.addAction(tr("Expand All")), &QAction::triggered,
|
||||||
connect(action, &QAction::triggered, this, [this] () { expandAll(); });
|
this, &QmlJSOutlineTreeView::expandAll);
|
||||||
action = contextMenu.addAction(tr("Collapse All"));
|
connect(contextMenu.addAction(tr("Collapse All")), &QAction::triggered,
|
||||||
connect(action, &QAction::triggered, this, [this] () { collapseAllExceptRoot(); });
|
this, &QmlJSOutlineTreeView::collapseAllExceptRoot);
|
||||||
|
|
||||||
contextMenu.exec(event->globalPos());
|
contextMenu.exec(event->globalPos());
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user