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

Method iterate

common/yacreader_global.cpp:143–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141}
142
143void YACReader::iterate(const QModelIndex &index,
144 const QAbstractItemModel *model,
145 const std::function<bool(const QModelIndex &)> &iteration)
146{
147 if (index.isValid()) {
148 auto continueIterating = iteration(index);
149 if (!continueIterating) {
150 return;
151 }
152 }
153 if ((index.flags() & Qt::ItemNeverHasChildren) || !model->hasChildren(index))
154 return;
155 auto rows = model->rowCount(index);
156 for (int i = 0; i < rows; ++i)
157 iterate(model->index(i, 0, index), model, iteration);
158}
159
160QLibrary *YACReader::load7zLibrary()
161{

Callers

nothing calls this directly

Calls 4

isValidMethod · 0.45
flagsMethod · 0.45
rowCountMethod · 0.45
indexMethod · 0.45

Tested by

no test coverage detected