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);
}
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);
}
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()) {
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)));