| 130 | {} |
| 131 | |
| 132 | void CMakeImportJsonJob::start() |
| 133 | { |
| 134 | auto commandsFile = CMake::commandsFile(project()); |
| 135 | if (!QFileInfo::exists(commandsFile.toLocalFile())) { |
| 136 | qCWarning(CMAKE) << "Could not import CMake project" << project()->path() << "('compile_commands.json' missing)"; |
| 137 | emitResult(); |
| 138 | return; |
| 139 | } |
| 140 | |
| 141 | const Path currentBuildDir = CMake::currentBuildDir(m_project); |
| 142 | Q_ASSERT (!currentBuildDir.isEmpty()); |
| 143 | |
| 144 | const Path targetsFilePath = CMake::targetDirectoriesFile(m_project); |
| 145 | const QString sourceDir = m_project->path().toLocalFile(); |
| 146 | auto rt = ICore::self()->runtimeController()->currentRuntime(); |
| 147 | |
| 148 | auto future = QtConcurrent::run(import, commandsFile, targetsFilePath, sourceDir, rt->pathInRuntime(currentBuildDir)); |
| 149 | m_futureWatcher.setFuture(future); |
| 150 | } |
| 151 | |
| 152 | void CMakeImportJsonJob::importCompileCommandsJsonFinished() |
| 153 | { |
nothing calls this directly
no test coverage detected