| 50 | } |
| 51 | |
| 52 | KDevelop::CompileAnalyzeJob * Analyzer::createJob(KDevelop::IProject* project, |
| 53 | const KDevelop::Path& buildDirectory, |
| 54 | const QUrl& url, const QStringList& filePaths) |
| 55 | { |
| 56 | ProjectSettings projectSettings; |
| 57 | projectSettings.setSharedConfig(project->projectConfiguration()); |
| 58 | projectSettings.load(); |
| 59 | |
| 60 | JobParameters params; |
| 61 | |
| 62 | params.executablePath = GlobalSettings::executablePath().toLocalFile(); |
| 63 | |
| 64 | params.url = url; |
| 65 | params.filePaths = filePaths; |
| 66 | params.buildDir = buildDirectory.toLocalFile(); |
| 67 | QString checkSetSelectionId = projectSettings.checkSetSelection(); |
| 68 | if (checkSetSelectionId == QLatin1String("Default")) { |
| 69 | checkSetSelectionId = m_checkSetSelectionManager->defaultCheckSetSelectionId(); |
| 70 | } |
| 71 | const auto checks = checkSetSelectionId.isEmpty() ? projectSettings.checks() : m_checkSetSelectionManager->checkSetSelection(checkSetSelectionId).selectionAsString(); |
| 72 | if (!checks.isEmpty()) { |
| 73 | params.checks = checks; |
| 74 | } else { |
| 75 | params.checks = ChecksDB::defaultChecks(); |
| 76 | } |
| 77 | params.onlyQt = projectSettings.onlyQt(); |
| 78 | params.qtDeveloper = projectSettings.qtDeveloper(); |
| 79 | params.qt4Compat = projectSettings.qt4Compat(); |
| 80 | params.visitImplicitCode = projectSettings.visitImplicitCode(); |
| 81 | |
| 82 | params.ignoreIncludedFiles = projectSettings.ignoreIncludedFiles(); |
| 83 | params.headerFilter = projectSettings.headerFilter(); |
| 84 | |
| 85 | params.enableAllFixits = projectSettings.enableAllFixits(); |
| 86 | params.noInplaceFixits = projectSettings.noInplaceFixits(); |
| 87 | |
| 88 | params.extraAppend = projectSettings.extraAppend(); |
| 89 | params.extraPrepend = projectSettings.extraPrepend(); |
| 90 | params.extraClazy = projectSettings.extraClazy(); |
| 91 | |
| 92 | params.verboseOutput = GlobalSettings::verboseOutput(); |
| 93 | |
| 94 | params.parallelJobCount = |
| 95 | GlobalSettings::parallelJobsEnabled() ? |
| 96 | (GlobalSettings::parallelJobsAutoCount() ? |
| 97 | QThread::idealThreadCount() : |
| 98 | GlobalSettings::parallelJobsFixedCount()) : |
| 99 | 1; |
| 100 | |
| 101 | auto db = m_plugin->loadedChecksDB(); |
| 102 | |
| 103 | return new Job(params, db); |
| 104 | } |
| 105 | |
| 106 | } |
| 107 |
nothing calls this directly
no test coverage detected