| 981 | } |
| 982 | |
| 983 | void InstanceView::scrollTo(const QModelIndex& index, ScrollHint hint) |
| 984 | { |
| 985 | if (!index.isValid()) |
| 986 | return; |
| 987 | |
| 988 | const QRect rect = visualRect(index); |
| 989 | if (hint == EnsureVisible && viewport()->rect().contains(rect)) { |
| 990 | viewport()->update(rect); |
| 991 | return; |
| 992 | } |
| 993 | |
| 994 | verticalScrollBar()->setValue(verticalScrollToValue(index, rect, hint)); |
| 995 | } |
| 996 | |
| 997 | int InstanceView::verticalScrollToValue([[maybe_unused]] const QModelIndex& index, const QRect& rect, QListView::ScrollHint hint) const |
| 998 | { |
no test coverage detected