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

Method failedConnection

plugins/cmake/cmakemanager.cpp:162–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160 }
161
162 void failedConnection(int code) {
163 Q_ASSERT(code > 0);
164 Q_ASSERT(!server->isServerAvailable());
165
166 qCDebug(CMAKE) << "CMake does not provide server mode, using compile_commands.json to import" << project->name();
167
168 // parse the JSON file
169 auto* job = new CMakeImportJsonJob(project, this);
170
171 // create the JSON file if it doesn't exist
172 auto commandsFile = CMake::commandsFile(project);
173 if (!QFileInfo::exists(commandsFile.toLocalFile())) {
174 qCDebug(CMAKE) << "couldn't find commands file:" << commandsFile << "- now trying to reconfigure";
175 addSubjob(manager->builder()->configure(project));
176 }
177
178 connect(job, &CMakeImportJsonJob::result, this, [this, job]() {
179 if (job->error() == 0) {
180 manager->integrateData(job->projectData(), job->project());
181 }
182 });
183 addSubjob(job);
184 ExecuteCompositeJob::start();
185 }
186
187 void reconfigureThenImport()
188 {

Callers

nothing calls this directly

Calls 11

commandsFileFunction · 0.85
isServerAvailableMethod · 0.80
toLocalFileMethod · 0.80
integrateDataMethod · 0.80
startFunction · 0.50
nameMethod · 0.45
configureMethod · 0.45
builderMethod · 0.45
errorMethod · 0.45
projectDataMethod · 0.45
projectMethod · 0.45

Tested by

no test coverage detected