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

Method createImportJob

plugins/cmake/cmakemanager.cpp:227–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

225};
226
227KJob* CMakeManager::createImportJob(ProjectFolderItem* item, bool forceConfigure)
228{
229 auto project = item->project();
230
231 delete m_configureStatusMessages.value(project); // discard now-obsolete message from the previous configuration
232
233 auto job = new ChooseCMakeInterfaceJob(project, this, forceConfigure);
234 connect(job, &KJob::result, this, [this, job, project]() {
235 if (job->error() != 0) {
236 qCWarning(CMAKE) << "couldn't load project successfully" << project->name() << job->error()
237 << job->errorText();
238 showConfigureErrorMessage(*project, job->errorString());
239 }
240 });
241
242 const QList<KJob*> jobs = {
243 job,
244 KDevelop::AbstractFileManagerPlugin::createImportJob(item) // generate the file system listing
245 };
246
247 Q_ASSERT(!jobs.contains(nullptr));
248 auto* composite = new ExecuteCompositeJob(this, jobs);
249 // even if the cmake call failed, we want to load the project so that the project can be worked on
250 composite->setAbortOnSubjobError(false);
251 return composite;
252}
253
254KJob* CMakeManager::createImportJob(ProjectFolderItem* item)
255{

Callers 1

testReloadMethod · 0.45

Calls 8

errorTextMethod · 0.80
setAbortOnSubjobErrorMethod · 0.80
projectMethod · 0.45
valueMethod · 0.45
errorMethod · 0.45
nameMethod · 0.45
errorStringMethod · 0.45
containsMethod · 0.45

Tested by 1

testReloadMethod · 0.36