MCPcopy Create free account
hub / github.com/YACReader/yacreader / filterAcceptsRow

Method filterAcceptsRow

YACReaderLibrary/db/folder_model.cpp:1010–1023  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1008}
1009
1010bool FolderModelProxy::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
1011{
1012 if (!filterEnabled)
1013 return true;
1014
1015 auto parent = static_cast<FolderItem *>(source_parent.internalPointer());
1016
1017 if (parent == 0)
1018 parent = static_cast<FolderModel *>(sourceModel())->rootItem;
1019
1020 FolderItem *item = parent->children().at(source_row);
1021
1022 return filteredItems.contains(item->id);
1023}
1024
1025void FolderModelProxy::setFilterData(QMap<unsigned long long, FolderItem *> *filteredItems, FolderItem *root)
1026{

Callers

nothing calls this directly

Calls 2

childrenMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected