MCPcopy Create free account
hub / github.com/MultiMC/Launcher / filterAcceptsRow

Method filterAcceptsRow

launcher/VersionProxyModel.cpp:19–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17 }
18
19 bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
20 {
21 const auto &filters = m_parent->filters();
22 for (auto it = filters.begin(); it != filters.end(); ++it)
23 {
24 auto idx = sourceModel()->index(source_row, 0, source_parent);
25 auto data = sourceModel()->data(idx, it.key());
26 auto match = data.toString();
27 if(!it.value()->accepts(match))
28 {
29 return false;
30 }
31 }
32 return true;
33 }
34
35 void filterChanged()
36 {

Callers

nothing calls this directly

Calls 7

keyMethod · 0.80
acceptsMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
indexMethod · 0.45
dataMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected