From 0464ea82a6850f58805bc4d6fc1df5369d83c3df Mon Sep 17 00:00:00 2001 From: Méven Car Date: Tue, 29 Apr 2025 12:33:44 +0200 Subject: Clazy fix --- src/views/dolphinview.cpp | 2 +- src/views/dolphinviewactionhandler.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/views') diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index ee7ac51d2..0afa27d73 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -1883,7 +1883,7 @@ void DolphinView::selectNextItem() Q_ASSERT_X(false, "DolphinView", "Selecting the next item failed."); return; } - const auto lastSelectedIndex = m_model->index(selectedItems().last()); + const auto lastSelectedIndex = m_model->index(*selectedItems().constEnd()); if (lastSelectedIndex < 0) { Q_ASSERT_X(false, "DolphinView", "Selecting the next item failed."); return; diff --git a/src/views/dolphinviewactionhandler.cpp b/src/views/dolphinviewactionhandler.cpp index 079cd22fd..ce698a178 100644 --- a/src/views/dolphinviewactionhandler.cpp +++ b/src/views/dolphinviewactionhandler.cpp @@ -364,7 +364,8 @@ void DolphinViewActionHandler::createActions(SelectionMode::ActionTextHelper *ac viewSettings->setText(i18nc("@action:intoolbar", "View Settings")); viewSettings->setWhatsThis( xi18nc("@info:whatsthis View Settings Toolbutton", "This cycles through all view modes. The dropdown menu contains various view-related actions.")); - for (QAction *action : viewModeActions->actions()) { + const auto actions = viewModeActions->actions(); + for (QAction *action : actions) { viewSettings->addAction(action); } viewSettings->addSeparator(); -- cgit v1.3