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

Method linkWasActivated

kdevplatform/language/duchain/navigation/useswidget.cpp:451–465  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

449}
450
451void ContextUsesWidget::linkWasActivated(const QString& link)
452{
453 if (link == QLatin1String("navigateToFunction")) {
454 DUChainReadLocker lock(DUChain::lock());
455 DUContext* context = m_context.context();
456 if (context) {
457 CursorInRevision contextStart = context->range().start;
458 KTextEditor::Cursor cursor(contextStart.line, contextStart.column);
459 QUrl url = context->url().toUrl();
460 lock.unlock();
461 ForegroundLock fgLock;
462 ICore::self()->documentController()->openDocument(url, cursor);
463 }
464 }
465}
466
467DeclarationWidget::DeclarationWidget(const CodeRepresentation& code, const IndexedDeclaration& decl)
468{

Callers

nothing calls this directly

Calls 7

documentControllerMethod · 0.80
contextMethod · 0.45
rangeMethod · 0.45
toUrlMethod · 0.45
urlMethod · 0.45
unlockMethod · 0.45
openDocumentMethod · 0.45

Tested by

no test coverage detected