| 58 | } |
| 59 | |
| 60 | void CTestFindJob::updateReady(const KDevelop::IndexedString& document, const KDevelop::ReferencedTopDUContext& context) |
| 61 | { |
| 62 | if (!m_suite) { |
| 63 | // killed or done already |
| 64 | return; |
| 65 | } |
| 66 | |
| 67 | if (Q_UNLIKELY(!m_suite->project())) { |
| 68 | qCDebug(CMAKE_TESTING) << "Cannot add test suite" << m_suite->name() |
| 69 | << "because its project is already destroyed (probably closed by the user)."; |
| 70 | kill(); |
| 71 | return; |
| 72 | } |
| 73 | |
| 74 | qCDebug(CMAKE_TESTING) << "context update ready" << m_pendingFiles << document.str(); |
| 75 | m_suite->loadDeclarations(document, context); |
| 76 | m_pendingFiles.removeAll(KDevelop::Path(document.toUrl())); |
| 77 | |
| 78 | if (m_pendingFiles.isEmpty()) { |
| 79 | m_suite = nullptr; |
| 80 | emitResult(); |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | bool CTestFindJob::doKill() |
| 85 | { |