| 116 | |
| 117 | |
| 118 | TestFile::~TestFile() |
| 119 | { |
| 120 | Q_D(TestFile); |
| 121 | |
| 122 | if (auto* document = ICore::self()->documentController()->documentForUrl(d->url.toUrl())) { |
| 123 | document->close(KDevelop::IDocument::Discard); |
| 124 | } |
| 125 | |
| 126 | auto backgroundParser = ICore::self()->languageController()->backgroundParser(); |
| 127 | backgroundParser->removeDocument(d->url, this); |
| 128 | QTRY_VERIFY(!backgroundParser->parseJobForDocument(d->url)); |
| 129 | |
| 130 | if (d->topContext && !d->keepDUChainData) { |
| 131 | DUChainWriteLocker lock; |
| 132 | DUChain::self()->removeDocumentChain(d->topContext.data()); |
| 133 | } |
| 134 | QFile::remove(d->file); |
| 135 | } |
| 136 | |
| 137 | IndexedString TestFile::url() const |
| 138 | { |
nothing calls this directly
no test coverage detected