| 57 | } |
| 58 | |
| 59 | void ImportJob::start() |
| 60 | { |
| 61 | const auto* bsm = m_project->buildSystemManager(); |
| 62 | const auto sourceDirectory = m_project->path(); |
| 63 | const auto buildDirectory = bsm->buildDirectory(m_project->projectItem()); |
| 64 | |
| 65 | auto future = QtConcurrent::run( |
| 66 | [sourceDirectory, buildDirectory, invalidateOutdatedData = m_invalidateOutdatedData]() -> CMakeProjectData { |
| 67 | const auto replyIndex = findReplyIndexFile(buildDirectory.toLocalFile()); |
| 68 | if (!replyIndex.isValid() || (invalidateOutdatedData && replyIndex.isOutdated())) { |
| 69 | return {}; |
| 70 | } |
| 71 | |
| 72 | auto ret = parseReplyIndexFile(replyIndex, sourceDirectory, buildDirectory); |
| 73 | if (invalidateOutdatedData && ret.isOutdated) { |
| 74 | ret.compilationData.isValid = false; |
| 75 | } |
| 76 | if (!ret.compilationData.isValid) { |
| 77 | return ret; |
| 78 | } |
| 79 | |
| 80 | ret.testSuites = CMake::importTestSuites(buildDirectory); |
| 81 | return ret; |
| 82 | }); |
| 83 | m_futureWatcher.setFuture(future); |
| 84 | } |
| 85 | } |
| 86 | } |
| 87 |
nothing calls this directly
no test coverage detected