MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / addMenu

Method addMenu

src/common/actionmanager/actioncontainer.cpp:174–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172}
173
174void ActionContainer::addMenu(ActionContainer *menu, const QString &groupId)
175{
176 auto actualGroupId = !groupId.isEmpty() ? groupId : G_DEFAULT_TWO;
177 auto groupIt = d->findGroup(actualGroupId);
178 QTC_ASSERT(groupIt != d->groupList.constEnd(), return );
179
180 d->groupList[groupIt - d->groupList.constBegin()].items.append(menu);
181 connect(menu, &QObject::destroyed, d, &ActionContainerPrivate::itemDestroyed);
182
183 QAction *beforeAction = d->insertLocation(groupIt);
184 insertMenu(beforeAction, menu);
185
186 d->scheduleUpdate();
187}
188
189void ActionContainer::addMenu(ActionContainer *before, ActionContainer *menu)
190{

Callers

nothing calls this directly

Calls 9

connectFunction · 0.85
insertLocationMethod · 0.80
scheduleUpdateMethod · 0.80
insertMethod · 0.80
containerActionMethod · 0.80
isEmptyMethod · 0.45
findGroupMethod · 0.45
appendMethod · 0.45
indexOfMethod · 0.45

Tested by

no test coverage detected