| 789 | } |
| 790 | |
| 791 | QList<IDocument*> DocumentController::openDocuments() const |
| 792 | { |
| 793 | Q_D(const DocumentController); |
| 794 | |
| 795 | QList<IDocument*> opened; |
| 796 | for (IDocument* doc : std::as_const(d->documents)) { |
| 797 | auto *sdoc = dynamic_cast<Sublime::Document*>(doc); |
| 798 | if( !sdoc ) |
| 799 | { |
| 800 | continue; |
| 801 | } |
| 802 | if (!sdoc->views().isEmpty()) |
| 803 | opened << doc; |
| 804 | } |
| 805 | return opened; |
| 806 | } |
| 807 | |
| 808 | void DocumentController::activateDocument( IDocument * document, const KTextEditor::Range& range ) |
| 809 | { |