| 139 | } |
| 140 | |
| 141 | void CheckGroup::collectEnabledChecks(QStringList& enabledChecks) const |
| 142 | { |
| 143 | const auto effectiveGroupEnabledState = this->effectiveGroupEnabledState(); |
| 144 | |
| 145 | const bool appendGroupRule = |
| 146 | (!m_superGroup) || |
| 147 | (m_superGroup->effectiveGroupEnabledState() != effectiveGroupEnabledState); |
| 148 | if (appendGroupRule) { |
| 149 | QString rule = wildCardText(); |
| 150 | if (effectiveGroupEnabledState == CheckGroup::Disabled) { |
| 151 | rule.prepend(QLatin1Char('-')); |
| 152 | } |
| 153 | enabledChecks.append(rule); |
| 154 | } |
| 155 | |
| 156 | for (const auto* subGroup : m_subGroups) { |
| 157 | subGroup->collectEnabledChecks(enabledChecks); |
| 158 | } |
| 159 | |
| 160 | for (int i = 0; i < m_checks.size(); ++i) { |
| 161 | const auto effectiveCheckEnabledState = this->effectiveCheckEnabledState(i); |
| 162 | if (effectiveGroupEnabledState != effectiveCheckEnabledState) { |
| 163 | QString rule = m_checks.at(i); |
| 164 | if (effectiveCheckEnabledState == CheckGroup::Disabled) { |
| 165 | rule.prepend(QLatin1Char('-')); |
| 166 | } |
| 167 | enabledChecks.append(rule); |
| 168 | } |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | const QString& CheckGroup::prefix() const |
| 173 | { |
nothing calls this directly
no test coverage detected