MCPcopy Create free account
hub / github.com/Vector35/debugger / filterAcceptsRow

Method filterAcceptsRow

ui/registerswidget.cpp:891–910  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

889
890
891bool DebugRegisterFilterProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex& sourceParent) const
892{
893 QRegularExpression regExp = filterRegularExpression();
894 if (!regExp.isValid())
895 return true;
896
897 QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
898 DebugRegisterItem* item = static_cast<DebugRegisterItem*>(index.internalPointer());
899 if (m_hideUnusedRegisters && !item->used())
900 return false;
901
902 for (int column = 0; column < sourceModel()->columnCount(sourceParent); column++)
903 {
904 QModelIndex index = sourceModel()->index(sourceRow, column, sourceParent);
905 QString data = index.data(SortFilterRole).toString();
906 if (data.indexOf(regExp) != -1)
907 return true;
908 }
909 return false;
910}
911
912void DebugRegisterFilterProxyModel::toggleHideUnusedRegisters()
913{

Callers

nothing calls this directly

Calls 4

usedMethod · 0.80
indexMethod · 0.45
columnCountMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected