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

Method filterAcceptsRow

launcher/ui/pages/modplatform/ftb/FtbFilterModel.cpp:61–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61bool FilterModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const
62{
63 if (searchTerm.isEmpty()) {
64 return true;
65 }
66
67 auto index = sourceModel()->index(sourceRow, 0, sourceParent);
68 auto pack = sourceModel()->data(index, Qt::UserRole).value<ModpacksCH::Modpack>();
69 return pack.name.contains(searchTerm, Qt::CaseInsensitive);
70}
71
72bool FilterModel::lessThan(const QModelIndex &left, const QModelIndex &right) const
73{

Callers

nothing calls this directly

Calls 4

isEmptyMethod · 0.80
indexMethod · 0.45
dataMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected