// sanity check - if that check fails our indexes would be messed up
for(int row = start; row <= end; row++) {
QModelIndex child = sourceModel()->index(row, 0, parent);
if(sourceModel()->rowCount(child) > 0) {
// sanity check - if that check fails our indexes would be messed up
for(int row = start; row <= end; row++) {
QModelIndex child = sourceModel()->index(row, 0, parent);
if(sourceModel()->rowCount(child) > 0) {