| 225 | }; |
| 226 | |
| 227 | KJob* 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 | |
| 254 | KJob* CMakeManager::createImportJob(ProjectFolderItem* item) |
| 255 | { |