WInstancesTab: Make use of initializer list over operator<<

This commit is contained in:
Lioncash 2020-07-10 16:15:39 -04:00
parent 1a4666e510
commit b868a94182
1 changed files with 9 additions and 4 deletions

View File

@ -59,12 +59,17 @@ WInstancesTab::WInstancesTab(CWorldEditor *pEditor, QWidget *parent) :
mpUnhideAllTypes = new QAction(tr("UnhideAllTypes"), this);
mpUnhideAll = new QAction(tr("Unhide all"), this);
QList<QAction*> ActionList;
ActionList << mpHideInstance << mpHideType << mpHideAllTypes << mpHideAllExceptType << mpSeparator
<< mpUnhideAllTypes << mpUnhideAll;
mpTreeContextMenu = new QMenu(this);
mpTreeContextMenu->addActions(ActionList);
mpTreeContextMenu->addActions({
mpHideInstance,
mpHideType,
mpHideAllTypes,
mpHideAllExceptType,
mpSeparator,
mpUnhideAllTypes,
mpUnhideAll,
});
connect(mpHideInstance, &QAction::triggered, this, &WInstancesTab::OnHideInstanceAction);
connect(mpHideType, &QAction::triggered, this, &WInstancesTab::OnHideTypeAction);