Replace QModelIndex::child() to avoid a deprecation warning.