aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2016-06-29 08:25:13 +0300
committerOrgad Shaneh <orgads@gmail.com>2016-06-29 09:05:28 +0000
commitb6bc52065c0470d57f6238d9a42259989d949e54 (patch)
tree69ba0a810f12d49ee6c4794d85ebc4c74cb3cdfd
parent943c76f4ab46c208159dfe079f638492729ae449 (diff)
QmlJSEditor: Minor cleanup
Remove unneeded variable, and connect directly to member functions. Change-Id: I2c5077676fc8d3f975d03a71b3e566b692e6b7c6 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
-rw-r--r--src/plugins/qmljseditor/qmljsoutlinetreeview.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/qmljseditor/qmljsoutlinetreeview.cpp b/src/plugins/qmljseditor/qmljsoutlinetreeview.cpp
index 996c17dca9..d89b84a3b5 100644
--- a/src/plugins/qmljseditor/qmljsoutlinetreeview.cpp
+++ b/src/plugins/qmljseditor/qmljsoutlinetreeview.cpp
@@ -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());