QmlJSEditor: Fix compile with Qt5.5

Avoid using functionality introduced with Qt5.6.

Change-Id: Icfa4eeb547b651a19aa745b5de1cb413f9b6b4ef
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Christian Stenger
2016-06-28 13:35:37 +02:00
parent 0a3f596599
commit 06b2df0e27

View File

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