| 1002 | } |
| 1003 | |
| 1004 | void InstanceView::scrollTo(const QModelIndex& index, ScrollHint hint) |
| 1005 | { |
| 1006 | if (!index.isValid()) |
| 1007 | return; |
| 1008 | |
| 1009 | const QRect rect = visualRect(index); |
| 1010 | if (hint == EnsureVisible && viewport()->rect().contains(rect)) { |
| 1011 | viewport()->update(rect); |
| 1012 | return; |
| 1013 | } |
| 1014 | |
| 1015 | verticalScrollBar()->setValue(verticalScrollToValue(index, rect, hint)); |
| 1016 | } |
| 1017 | |
| 1018 | int InstanceView::verticalScrollToValue([[maybe_unused]] const QModelIndex& index, const QRect& rect, QListView::ScrollHint hint) const |
| 1019 | { |
no test coverage detected