18 auto const insertionDepth = (*current).location().depth();
19 while (current != end) {
20 auto currentRow = (*current).location();
21 auto currentDepth = currentRow.depth();
26 if (insertionDepth < currentDepth) {
27 current = buildRecursively(currentRow.rowRelativeToParent(), parent.child(lastRowInsertedAtThisDepth.row()),
29 }
else if (insertionDepth > currentDepth) {
32 lastRowInsertedAtThisDepth =
33 m_adaptedMainModel.insertChildRow(modelIndexAt(parent), insertionIndex, (*current).cells());