MCPcopy Create free account
hub / github.com/KDE/kdevelop / repositoryCheckFinished

Method repositoryCheckFinished

kdevplatform/shell/textdocument.cpp:743–761  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

741}
742
743void KDevelop::TextDocument::repositoryCheckFinished(bool canRecreate) {
744 Q_D(TextDocument);
745
746 if ( d->state != IDocument::Dirty && d->state != IDocument::DirtyAndModified ) {
747 // document is not dirty for whatever reason, nothing to do.
748 return;
749 }
750 if ( ! canRecreate ) {
751 return;
752 }
753 // Ok, all safe, we can clean up the document. Close it if the file is gone,
754 // and reload if it's still there.
755 d->document->setModifiedOnDisk(KTextEditor::Document::OnDiskUnmodified);
756 if ( QFile::exists(d->document->url().path()) ) {
757 reload();
758 } else {
759 close(KDevelop::IDocument::Discard);
760 }
761}
762
763void KDevelop::TextDocument::slotDocumentLoaded()
764{

Callers

nothing calls this directly

Calls 3

closeFunction · 0.85
pathMethod · 0.45
urlMethod · 0.45

Tested by

no test coverage detected