| 373 | } |
| 374 | |
| 375 | bool Application::closeDocument(KTextEditor::Document *document) const |
| 376 | { |
| 377 | if (auto* const iDocument = iDocumentFromKteDocument(document)) { |
| 378 | return iDocument->close(); |
| 379 | } |
| 380 | |
| 381 | qCWarning(SHELL) << "ignoring request to close a document not registered with the document controller" << document; |
| 382 | // If the warning is printed in some scenario, consider returning |
| 383 | // `document && document->closeUrl()` instead of `false`. |
| 384 | return false; |
| 385 | } |
| 386 | |
| 387 | KTextEditor::Plugin *Application::plugin(const QString &id) const |
| 388 | { |
nothing calls this directly
no test coverage detected