MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / filterAcceptsRow

Method filterAcceptsRow

launcher/VersionProxyModel.cpp:54–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52 }
53
54 bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
55 {
56 const auto &filters = m_parent->filters();
57 for (auto it = filters.begin(); it != filters.end(); ++it)
58 {
59 auto idx = sourceModel()->index(source_row, 0, source_parent);
60 auto data = sourceModel()->data(idx, it.key());
61 auto match = data.toString();
62 if(!it.value()->accepts(match))
63 {
64 return false;
65 }
66 }
67 return true;
68 }
69
70 void filterChanged()
71 {

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected