| 638 | } |
| 639 | |
| 640 | QPair<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 | |
| 659 | bool QuickOpenPlugin::jumpToSpecialObject() |
| 660 | { |
nothing calls this directly
no test coverage detected