MCPcopy Create free account
hub / github.com/KDAB/GammaRay / populate

Method populate

plugins/widgetinspector/widget3dwindowmodel.cpp:165–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163}
164
165void Widget3DWindowModel::populate()
166{
167 QVector<QModelIndex> toVisit = { QModelIndex() };
168 while (!toVisit.isEmpty()) {
169 const auto idx = toVisit.takeFirst();
170 if (idx.data(Widget3DModel::IsWindowRole).toBool()) {
171 mNodes.push_back(new WindowNode(idx));
172 }
173
174 for (int i = 0, cnt = sourceModel()->rowCount(idx); i < cnt; ++i) {
175 toVisit.push_front(sourceModel()->index(i, 0, idx));
176 }
177 }
178}

Callers

nothing calls this directly

Calls 5

QModelIndexClass · 0.70
isEmptyMethod · 0.45
dataMethod · 0.45
rowCountMethod · 0.45
indexMethod · 0.45

Tested by

no test coverage detected