X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/39fcc8945051365ae240e0bf92fcb3403d77caed..99883ca8de38551e72d976fd8a5874013eeef6c0:/src/dolphinpart.cpp diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp index 0e771accb..b3b47304e 100644 --- a/src/dolphinpart.cpp +++ b/src/dolphinpart.cpp @@ -253,7 +253,7 @@ void DolphinPart::slotSelectionChanged(const KFileItemList& selection) { const bool hasSelection = !selection.isEmpty(); - QAction* renameAction = actionCollection()->action(QStringLiteral("rename")); + QAction* renameAction = actionCollection()->action(KStandardAction::name(KStandardAction::RenameFile)); QAction* moveToTrashAction = actionCollection()->action(KStandardAction::name(KStandardAction::MoveToTrash)); QAction* deleteAction = actionCollection()->action(KStandardAction::name(KStandardAction::DeleteFile)); QAction* editMimeTypeAction = actionCollection()->action(QStringLiteral("editMimeType")); @@ -447,7 +447,7 @@ void DolphinPart::slotOpenContextMenu(const QPoint& pos, } if (supportsMoving) { - editActions.append(actionCollection()->action(QStringLiteral("rename"))); + editActions.append(actionCollection()->action(KStandardAction::name(KStandardAction::RenameFile))); } // Normally KonqPopupMenu only shows the "Create new" submenu in the current view @@ -597,6 +597,7 @@ void DolphinPart::setFilesToSelect(const QList& files) bool DolphinPart::eventFilter(QObject* obj, QEvent* event) { + using ShiftState = DolphinRemoveAction::ShiftState; const int type = event->type(); if ((type == QEvent::KeyPress || type == QEvent::KeyRelease) && m_removeAction) { @@ -604,7 +605,7 @@ bool DolphinPart::eventFilter(QObject* obj, QEvent* event) if (menu && menu->parent() == m_view) { QKeyEvent* ev = static_cast(event); if (ev->key() == Qt::Key_Shift) { - m_removeAction->update(); + m_removeAction->update(type == QEvent::KeyPress ? ShiftState::Pressed : ShiftState::Released); } } }