┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views
diff options
context:
space:
mode:
authorMéven Car <[email protected]>2025-04-29 12:33:44 +0200
committerMéven Car <[email protected]>2025-04-29 12:33:44 +0200
commit0464ea82a6850f58805bc4d6fc1df5369d83c3df (patch)
treecd3747579d3f6fd08a59c915c4002aeaab580951 /src/views
parent246fdb3ebbde298ddb20f0323ba717c5cf9ba925 (diff)
Clazy fix
Diffstat (limited to 'src/views')
-rw-r--r--src/views/dolphinview.cpp2
-rw-r--r--src/views/dolphinviewactionhandler.cpp3
2 files changed, 3 insertions, 2 deletions
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();