| 741 | } |
| 742 | |
| 743 | void 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 | |
| 763 | void KDevelop::TextDocument::slotDocumentLoaded() |
| 764 | { |