Skip to content

Commit

Permalink
tst_qheaderview: Do not use the deprecated QAbstractItemModel::reset()
Browse files Browse the repository at this point in the history
Still do a begin/end reset model in place, which is probably not the
best code but since it's a test and it works it should be enough

Change-Id: Iffaf8d69d5be64ef5e1e359e3d90a1e8174fc13b
Reviewed-by: David Faure <[email protected]>
Reviewed-by: Frederik Gladhorn <[email protected]>
  • Loading branch information
albert-astals-cid-kdab committed Feb 11, 2019
1 parent ece341e commit 9332f8c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,17 @@ class XResetModel : public QStandardItemModel
blockSignals(true);
bool r = QStandardItemModel::removeRows(row, count, parent);
blockSignals(false);
emit reset();
beginResetModel();
endResetModel();
return r;
}
virtual bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex())
{
blockSignals(true);
bool r = QStandardItemModel::insertRows(row, count, parent);
blockSignals(false);
emit reset();
beginResetModel();
endResetModel();
return r;
}
};
Expand Down

0 comments on commit 9332f8c

Please sign in to comment.