| 61 | } |
| 62 | |
| 63 | void ProjectConfigPage::updateCommandLine() |
| 64 | { |
| 65 | m_parameters->checkStyle = ui->kcfg_checkStyle->isChecked(); |
| 66 | m_parameters->checkPerformance = ui->kcfg_checkPerformance->isChecked(); |
| 67 | m_parameters->checkPortability = ui->kcfg_checkPortability->isChecked(); |
| 68 | m_parameters->checkInformation = ui->kcfg_checkInformation->isChecked(); |
| 69 | m_parameters->checkUnusedFunction = ui->kcfg_checkUnusedFunction->isChecked(); |
| 70 | m_parameters->checkMissingInclude = ui->kcfg_checkMissingInclude->isChecked(); |
| 71 | m_parameters->inconclusiveAnalysis = ui->kcfg_inconclusiveAnalysis->isChecked(); |
| 72 | m_parameters->forceCheck = ui->kcfg_forceCheck->isChecked(); |
| 73 | m_parameters->checkConfig = ui->kcfg_checkConfig->isChecked(); |
| 74 | m_parameters->useProjectIncludes = ui->kcfg_useProjectIncludes->isChecked(); |
| 75 | m_parameters->useSystemIncludes = ui->kcfg_useSystemIncludes->isChecked(); |
| 76 | m_parameters->ignoredIncludes = ui->kcfg_ignoredIncludes->text(); |
| 77 | m_parameters->extraParameters = ui->kcfg_extraParameters->text().trimmed(); |
| 78 | |
| 79 | QString message; |
| 80 | QString commandLine = m_parameters->commandLine(message).join(QLatin1Char(' ')); |
| 81 | |
| 82 | if (message.isEmpty()) { |
| 83 | ui->messageWidget->hide(); |
| 84 | } else { |
| 85 | ui->messageWidget->setText(message); |
| 86 | ui->messageWidget->show(); |
| 87 | } |
| 88 | |
| 89 | if (!ui->commandLineBreaks->isChecked()) { |
| 90 | ui->commandLine->setPlainText(commandLine); |
| 91 | return; |
| 92 | } |
| 93 | |
| 94 | commandLine.replace(QLatin1String(" -"), QLatin1String("\n-")); |
| 95 | QString filterText = ui->commandLineFilter->text(); |
| 96 | if (filterText.isEmpty()) { |
| 97 | ui->commandLine->setPlainText(commandLine); |
| 98 | ui->commandLineBreaks->setEnabled(true); |
| 99 | return; |
| 100 | } |
| 101 | |
| 102 | QStringList lines = commandLine.split(QLatin1Char('\n')); |
| 103 | QMutableStringListIterator i(lines); |
| 104 | |
| 105 | while (i.hasNext()) { |
| 106 | if (!i.next().contains(filterText)) { |
| 107 | i.remove(); |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | ui->commandLine->setPlainText(lines.join(QLatin1Char('\n'))); |
| 112 | ui->commandLineBreaks->setEnabled(false); |
| 113 | } |
| 114 | |
| 115 | } |
| 116 |
nothing calls this directly
no test coverage detected