MCPcopy Create free account
hub / github.com/KDE/kdevelop / start

Method start

plugins/cmake/cmakeimportjsonjob.cpp:132–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130{}
131
132void 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
152void CMakeImportJsonJob::importCompileCommandsJsonFinished()
153{

Callers

nothing calls this directly

Calls 10

commandsFileFunction · 0.85
currentBuildDirFunction · 0.85
targetDirectoriesFileFunction · 0.85
toLocalFileMethod · 0.80
currentRuntimeMethod · 0.80
runtimeControllerMethod · 0.80
runFunction · 0.50
pathMethod · 0.45
isEmptyMethod · 0.45
pathInRuntimeMethod · 0.45

Tested by

no test coverage detected