MCPcopy Create free account
hub / github.com/KDE/kate / documentOpened

Method documentOpened

apps/lib/katedocmanager.cpp:491–508  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

489}
490
491void KateDocManager::documentOpened()
492{
493 auto *doc = qobject_cast<KTextEditor::Document *>(sender());
494 if (!doc) {
495 return; // should never happen, but who knows
496 }
497 disconnect(doc, &KTextEditor::Document::completed, this, &KateDocManager::documentOpened);
498 disconnect(doc, &KParts::ReadOnlyPart::canceled, this, &KateDocManager::documentOpened);
499
500 // Only set "no success" when doc is empty to avoid close of files
501 // with other trouble when do closeOrphaned()
502 if (doc->openingError() && doc->isEmpty()) {
503 KateDocumentInfo *info = documentInfo(doc);
504 if (info) {
505 info->openSuccess = false;
506 }
507 }
508}
509
510KTextEditor::Document *KateDocManager::findDocumentForSessionConfigId(int sessionConfigId) const
511{

Callers

nothing calls this directly

Calls 1

isEmptyMethod · 0.45

Tested by

no test coverage detected