]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/dolphinviewactionhandler.cpp
Merge branch 'master' into kf6
[dolphin.git] / src / views / dolphinviewactionhandler.cpp
index 86ed05e9717c0f33292aaf2114beb13b96067502..98cbbdf80092c2612638800a3b0c1eb6c52ea365 100644 (file)
@@ -60,6 +60,7 @@ void DolphinViewActionHandler::setCurrentView(DolphinView *view)
     connect(view, &DolphinView::sortRoleChanged, this, &DolphinViewActionHandler::slotSortRoleChanged);
     connect(view, &DolphinView::zoomLevelChanged, this, &DolphinViewActionHandler::slotZoomLevelChanged);
     connect(view, &DolphinView::writeStateChanged, this, &DolphinViewActionHandler::slotWriteStateChanged);
+    slotWriteStateChanged(view->isFolderWritable());
     connect(view, &DolphinView::selectionModeChangeRequested, this, [this](bool enabled) {
         Q_EMIT selectionModeChangeTriggered(enabled);
     });
@@ -215,7 +216,7 @@ void DolphinViewActionHandler::createActions(SelectionMode::ActionTextHelper *ac
     viewModeActions->addAction(compactAction);
     viewModeActions->addAction(detailsAction);
     viewModeActions->setToolBarMode(KSelectAction::MenuMode);
-    connect(viewModeActions, &KSelectAction::triggered, this, &DolphinViewActionHandler::slotViewModeActionTriggered);
+    connect(viewModeActions, &KSelectAction::actionTriggered, this, &DolphinViewActionHandler::slotViewModeActionTriggered);
 
     QAction *zoomInAction = KStandardAction::zoomIn(this, &DolphinViewActionHandler::zoomIn, m_actionCollection);
     zoomInAction->setWhatsThis(i18nc("@info:whatsthis zoom in", "This increases the icon size."));
@@ -714,7 +715,7 @@ void DolphinViewActionHandler::slotSortTriggered(QAction *action)
     // actions and the sub-menu-actions. If an action gets checked, it must
     // be assured that all other actions get unchecked, except the ascending/
     // descending actions
-    for (QAction *groupAction : qAsConst(m_sortByActions)) {
+    for (QAction *groupAction : std::as_const(m_sortByActions)) {
         KActionMenu *actionMenu = qobject_cast<KActionMenu *>(groupAction);
         if (actionMenu) {
             const auto actions = actionMenu->menu()->actions();
@@ -820,3 +821,5 @@ void DolphinViewActionHandler::slotSelectionChanged(const KFileItemList &selecti
         }
     }
 }
+
+#include "moc_dolphinviewactionhandler.cpp"