]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphincontextmenu.cpp
Merge branch 'Applications/17.08'
[dolphin.git] / src / dolphincontextmenu.cpp
index 05082df86207a1d9b313ba1f0084071275d88656..b4d249d761420d468248f6f9ec0b16d5bf13c8ff 100644 (file)
@@ -124,7 +124,7 @@ DolphinContextMenu::Command DolphinContextMenu::open()
 void DolphinContextMenu::keyPressEvent(QKeyEvent *ev)
 {
     if (m_removeAction && ev->key() == Qt::Key_Shift) {
-        m_removeAction->update();
+        m_removeAction->update(DolphinRemoveAction::ShiftState::Pressed);
     }
     QMenu::keyPressEvent(ev);
 }
@@ -132,7 +132,7 @@ void DolphinContextMenu::keyPressEvent(QKeyEvent *ev)
 void DolphinContextMenu::keyReleaseEvent(QKeyEvent *ev)
 {
     if (m_removeAction && ev->key() == Qt::Key_Shift) {
-        m_removeAction->update();
+        m_removeAction->update(DolphinRemoveAction::ShiftState::Released);
     }
     QMenu::keyReleaseEvent(ev);
 }
@@ -392,8 +392,7 @@ void DolphinContextMenu::insertDefaultItemActions(const KFileItemListProperties&
     addSeparator();
 
     // Insert 'Rename'
-    QAction* renameAction = collection->action(QStringLiteral("rename"));
-    addAction(renameAction);
+    addAction(collection->action(KStandardAction::name(KStandardAction::RenameFile)));
 
     // Insert 'Move to Trash' and/or 'Delete'
     if (properties.supportsDeleting()) {
@@ -405,7 +404,7 @@ void DolphinContextMenu::insertDefaultItemActions(const KFileItemListProperties&
         if (showDeleteAction && showMoveToTrashAction) {
             delete m_removeAction;
             m_removeAction = 0;
-            addAction(m_mainWindow->actionCollection()->action(QStringLiteral("move_to_trash")));
+            addAction(m_mainWindow->actionCollection()->action(KStandardAction::name(KStandardAction::MoveToTrash)));
             addAction(m_mainWindow->actionCollection()->action(KStandardAction::name(KStandardAction::DeleteFile)));
         } else if (showDeleteAction && !showMoveToTrashAction) {
             addAction(m_mainWindow->actionCollection()->action(KStandardAction::name(KStandardAction::DeleteFile)));