| 671 | } |
| 672 | |
| 673 | KTextEditor::View* KDevelop::TextDocument::activeTextView() const |
| 674 | { |
| 675 | KTextEditor::View* fallback = nullptr; |
| 676 | for (auto view : views()) { |
| 677 | auto textView = qobject_cast<TextView*>(view)->textView(); |
| 678 | if (!textView) { |
| 679 | continue; |
| 680 | } |
| 681 | if (textView->hasFocus()) { |
| 682 | return textView; |
| 683 | } else if (textView->isVisible()) { |
| 684 | fallback = textView; |
| 685 | } else if (!fallback) { |
| 686 | fallback = textView; |
| 687 | } |
| 688 | } |
| 689 | return fallback; |
| 690 | } |
| 691 | |
| 692 | void KDevelop::TextDocument::newDocumentStatus(KTextEditor::Document *document) |
| 693 | { |
no test coverage detected