MCPcopy Create free account
hub / github.com/KDAB/GammaRay / updateFilter

Method updateFilter

ui/tools/problemreporter/problemreporterwidget.cpp:141–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139}
140
141void GammaRay::ProblemReporterWidget::updateFilter(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles)
142{
143 if (!roles.empty() && !roles.contains(Qt::CheckStateRole))
144 return;
145
146 for (int i = topLeft.row(); i <= bottomRight.row(); ++i) {
147 auto index = topLeft.sibling(i, 0);
148 auto checkState = index.data(Qt::CheckStateRole);
149 auto id = index.data(Qt::EditRole).toString();
150 if (!checkState.canConvert<Qt::CheckState>())
151 continue;
152
153 if (index.data(Qt::CheckStateRole).value<Qt::CheckState>() == Qt::Checked) {
154 m_problemsModel->enableChecker(id);
155 } else {
156 m_problemsModel->disableChecker(id);
157 }
158 }
159}

Callers

nothing calls this directly

Calls 5

rowMethod · 0.80
enableCheckerMethod · 0.80
disableCheckerMethod · 0.80
emptyMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected