MCPcopy Create free account
hub / github.com/KDE/kdevelop / contextMenuExtension

Method contextMenuExtension

plugins/qmakemanager/qmakemanager.cpp:474–494  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

472}
473
474ContextMenuExtension QMakeProjectManager::contextMenuExtension(Context* context, QWidget* parent)
475{
476 Q_UNUSED(parent);
477
478 ContextMenuExtension ext;
479
480 if (context->hasType(Context::ProjectItemContext)) {
481 auto* pic = dynamic_cast<ProjectItemContext*>(context);
482 Q_ASSERT(pic);
483 if (pic->items().isEmpty()) {
484 return ext;
485 }
486
487 m_actionItem = dynamic_cast<QMakeFolderItem*>(pic->items().first());
488 if (m_actionItem) {
489 ext.addAction(ContextMenuExtension::ProjectGroup, m_runQMake);
490 }
491 }
492
493 return ext;
494}
495
496void QMakeProjectManager::slotRunQMake()
497{

Callers

nothing calls this directly

Calls 5

hasTypeMethod · 0.80
isEmptyMethod · 0.45
itemsMethod · 0.45
firstMethod · 0.45
addActionMethod · 0.45

Tested by

no test coverage detected