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

Method specialObjectJumpPosition

plugins/quickopen/quickopenplugin.cpp:640–657  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

638}
639
640QPair<QUrl, KTextEditor::Cursor> QuickOpenPlugin::specialObjectJumpPosition() const
641{
642 KTextEditor::View* view = ICore::self()->documentController()->activeTextDocumentView();
643 if (!view) {
644 return qMakePair(QUrl(), KTextEditor::Cursor());
645 }
646
647 QUrl url = ICore::self()->documentController()->activeDocument()->url();
648 const auto languages = ICore::self()->languageController()->languagesForUrl(url);
649 for (const auto language : languages) {
650 QPair<QUrl, KTextEditor::Cursor> pos = language->specialLanguageObjectJumpCursor(url, KTextEditor::Cursor(view->cursorPosition()));
651 if (pos.second.isValid()) {
652 return pos;
653 }
654 }
655
656 return qMakePair(QUrl(), KTextEditor::Cursor::invalid());
657}
658
659bool QuickOpenPlugin::jumpToSpecialObject()
660{

Callers

nothing calls this directly

Calls 12

documentControllerMethod · 0.80
activeDocumentMethod · 0.80
languagesForUrlMethod · 0.80
languageControllerMethod · 0.80
CursorClass · 0.70
QUrlClass · 0.50
invalidFunction · 0.50
urlMethod · 0.45
cursorPositionMethod · 0.45
isValidMethod · 0.45

Tested by

no test coverage detected