QmlJSEditor: use initializer lists

Change-Id: Id02f4313cd789fabd1223c6934e1aa5a39ed43ca
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
This commit is contained in:
Tim Jenssen
2017-04-06 17:17:09 +02:00
committed by Robert Loehning
parent 063253d89e
commit 17fbbda57e

View File

@@ -140,9 +140,7 @@ void QmlJSOutlineWidget::setEditor(QmlJSEditorWidget *editor)
QList<QAction*> QmlJSOutlineWidget::filterMenuActions() const
{
QList<QAction*> list;
list.append(m_showBindingsAction);
return list;
return {m_showBindingsAction};
}
void QmlJSOutlineWidget::setCursorSynchronization(bool syncWithCursor)
@@ -160,9 +158,7 @@ void QmlJSOutlineWidget::restoreSettings(const QVariantMap &map)
QVariantMap QmlJSOutlineWidget::settings() const
{
QVariantMap map;
map.insert(QLatin1String("QmlJSOutline.ShowBindings"), m_showBindingsAction->isChecked());
return map;
return {{QLatin1String("QmlJSOutline.ShowBindings"), m_showBindingsAction->isChecked()}};
}
void QmlJSOutlineWidget::modelUpdated()