| 574 | } |
| 575 | |
| 576 | KTextEditor::View* MainWindow::activateView(KTextEditor::Document* document) |
| 577 | { |
| 578 | if (auto* const iDocument = iDocumentFromKteDocument(document)) { |
| 579 | Core::self()->documentControllerInternal()->activateDocument(iDocument); |
| 580 | auto* const view = activeView(); |
| 581 | if (view && view->document() == document) { |
| 582 | return view; |
| 583 | } |
| 584 | qCWarning(SHELL) << "activating a document" << document << "failed, active view:" << view; |
| 585 | return nullptr; |
| 586 | } |
| 587 | qCWarning(SHELL) << "ignoring request to activate a document not registered with the document controller" |
| 588 | << document; |
| 589 | return nullptr; |
| 590 | } |
| 591 | |
| 592 | bool MainWindow::closeView(KTextEditor::View *kteView) |
| 593 | { |