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

Method actionForItem

src/common/actionmanager/actioncontainer.cpp:249–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247}
248
249QAction *ActionContainer::actionForItem(QObject *item) const
250{
251 if (auto cmd = qobject_cast<Command *>(item)) {
252 return cmd->action();
253 } else if (auto container = qobject_cast<ActionContainer *>(item)) {
254 if (container->containerAction())
255 return container->containerAction();
256 }
257 QTC_ASSERT(false, return nullptr);
258}
259
260void ActionContainer::insertAction(QAction *before, Command *command)
261{

Callers 1

insertLocationMethod · 0.80

Calls 2

containerActionMethod · 0.80
actionMethod · 0.45

Tested by

no test coverage detected