Commit e2ece379 authored by Albert Astals Cid's avatar Albert Astals Cid

Port use of deprecated QModelIndex::child

parent 837a9c1f
......@@ -262,10 +262,11 @@ QModelIndexList Reviews::retrieveAnnotations(const QModelIndex &idx) const
{
QModelIndexList ret;
if (idx.isValid()) {
if (idx.model()->hasChildren(idx)) {
int rowCount = idx.model()->rowCount(idx);
const QAbstractItemModel *model = idx.model();
if (model->hasChildren(idx)) {
int rowCount = model->rowCount(idx);
for (int i = 0; i < rowCount; i++) {
ret += retrieveAnnotations(idx.child(i, idx.column()));
ret += retrieveAnnotations(model->index(i, idx.column(), idx));
}
} else {
ret += idx;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment