Commit eab41217 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

[Folder View] Use KStandardAction for rename, delete, and trash

Ensures the keyboard shortcut is visible in the menu

CCBUG: 392730

Differential Revision: https://phabricator.kde.org/D11947
parent dadb306d
......@@ -1543,11 +1543,8 @@ void FolderModel::createActions()
QAction *refresh = new QAction(QIcon::fromTheme(QStringLiteral("view-refresh")), i18n("&Refresh View"), this);
connect(refresh, &QAction::triggered, this, &FolderModel::refresh);
QAction *rename = new QAction(QIcon::fromTheme(QStringLiteral("edit-rename")), i18n("&Rename"), this);
connect(rename, &QAction::triggered, this, &FolderModel::requestRename);
QAction *trash = new QAction(QIcon::fromTheme(QStringLiteral("user-trash")), i18n("&Move to Trash"), this);
connect(trash, &QAction::triggered, this, &FolderModel::moveSelectedToTrash);
QAction *rename = KStandardAction::renameFile(this, &FolderModel::requestRename, this);
QAction *trash = KStandardAction::moveToTrash(this, &FolderModel::moveSelectedToTrash, this);
QAction *emptyTrash = new QAction(QIcon::fromTheme(QStringLiteral("trash-empty")), i18n("&Empty Trash Bin"), this);
connect(emptyTrash, &QAction::triggered, this, &FolderModel::emptyTrashBin);
......@@ -1555,8 +1552,7 @@ void FolderModel::createActions()
QAction *restoreFromTrash = new QAction(i18nc("Restore from trash", "Restore"), this);
connect(restoreFromTrash, &QAction::triggered, this, &FolderModel::restoreSelectedFromTrash);
QAction *del = new QAction(QIcon::fromTheme(QStringLiteral("edit-delete")), i18n("&Delete"), this);
connect(del, &QAction::triggered, this, &FolderModel::deleteSelected);
QAction *del = KStandardAction::deleteFile(this, &FolderModel::deleteSelected, this);
QAction *actOpen = new QAction(QIcon::fromTheme(QStringLiteral("window-new")), i18n("&Open"), this);
connect(actOpen, &QAction::triggered, this, &FolderModel::openSelected);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment