This commit is contained in:
Martin Rotter 2021-08-09 08:20:02 +02:00
parent 07d48240d5
commit 56948c1238
2 changed files with 8 additions and 8 deletions

View File

@ -30,7 +30,7 @@
<url type="donation">https://martinrotter.github.io/donate/</url> <url type="donation">https://martinrotter.github.io/donate/</url>
<content_rating type="oars-1.1" /> <content_rating type="oars-1.1" />
<releases> <releases>
<release version="3.9.2" date="2021-08-06"/> <release version="3.9.2" date="2021-08-09"/>
</releases> </releases>
<content_rating type="oars-1.0"> <content_rating type="oars-1.0">
<content_attribute id="violence-cartoon">none</content_attribute> <content_attribute id="violence-cartoon">none</content_attribute>

View File

@ -363,32 +363,32 @@ void FeedsView::openSelectedItemsInNewspaperMode() {
} }
void FeedsView::selectNextItem() { void FeedsView::selectNextItem() {
QModelIndex index_next = moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier); QModelIndex index_next = moveCursor(QAbstractItemView::CursorAction::MoveDown, Qt::KeyboardModifier::NoModifier);
while (m_proxyModel->hasChildren(index_next) && !isExpanded(index_next)) { while (m_proxyModel->hasChildren(index_next) && !isExpanded(index_next)) {
expand(index_next); expand(index_next);
index_next = moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier); index_next = moveCursor(QAbstractItemView::CursorAction::MoveDown, Qt::KeyboardModifier::NoModifier);
} }
if (index_next.isValid()) { if (index_next.isValid()) {
setCurrentIndex(index_next); setCurrentIndex(index_next);
scrollTo(index_next, QAbstractItemView::ScrollHint::PositionAtTop); scrollTo(index_next, QAbstractItemView::ScrollHint::EnsureVisible);
} }
setFocus(); setFocus();
} }
void FeedsView::selectPreviousItem() { void FeedsView::selectPreviousItem() {
QModelIndex index_previous = moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier); QModelIndex index_previous = moveCursor(QAbstractItemView::CursorAction::MoveUp, Qt::KeyboardModifier::NoModifier);
while (m_proxyModel->hasChildren(index_previous) && !isExpanded(index_previous)) { while (m_proxyModel->hasChildren(index_previous) && !isExpanded(index_previous)) {
expand(index_previous); expand(index_previous);
index_previous = moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier); index_previous = moveCursor(QAbstractItemView::CursorAction::MoveUp, Qt::KeyboardModifier::NoModifier);
} }
if (index_previous.isValid()) { if (index_previous.isValid()) {
setCurrentIndex(index_previous); setCurrentIndex(index_previous);
scrollTo(index_previous, QAbstractItemView::ScrollHint::PositionAtTop); scrollTo(index_previous, QAbstractItemView::ScrollHint::EnsureVisible);
} }
setFocus(); setFocus();
@ -406,7 +406,7 @@ void FeedsView::selectNextUnreadItem() {
if (next_unread_row.isValid()) { if (next_unread_row.isValid()) {
setCurrentIndex(next_unread_row); setCurrentIndex(next_unread_row);
scrollTo(next_unread_row, QAbstractItemView::ScrollHint::PositionAtTop); scrollTo(next_unread_row, QAbstractItemView::ScrollHint::EnsureVisible);
emit requestViewNextUnreadMessage(); emit requestViewNextUnreadMessage();
} }
} }