]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/dolphinviewactionhandler.cpp
Fix adding "Create New..." menu to toolbar
[dolphin.git] / src / views / dolphinviewactionhandler.cpp
index 2b3a241a3ea70ef7be6ba3e95c217cb00e722fb2..f4fbddf60cc34f5abbee3fcdcc7450ff9e56c9e7 100644 (file)
@@ -95,7 +95,7 @@ void DolphinViewActionHandler::createActions()
     m_actionCollection->setDefaultShortcut(newDirAction, Qt::Key_F10);
     newDirAction->setIcon(QIcon::fromTheme(QStringLiteral("folder-new")));
     newDirAction->setEnabled(false);    // Will be enabled in slotWriteStateChanged(bool) if the current URL is writable
-    connect(newDirAction, &QAction::triggered, this, &DolphinViewActionHandler::createDirectory);
+    connect(newDirAction, &QAction::triggered, this, &DolphinViewActionHandler::createDirectoryTriggered);
 
     // File menu
 
@@ -122,7 +122,7 @@ void DolphinViewActionHandler::createActions()
     QAction* deleteWithTrashShortcut = m_actionCollection->addAction(QStringLiteral("delete_shortcut"));
     // The descriptive text is just for the shortcuts editor.
     deleteWithTrashShortcut->setText(i18nc("@action \"Move to Trash\" for non-local files, etc.", "Delete (using shortcut for Trash)"));
-    m_actionCollection->setDefaultShortcut(deleteWithTrashShortcut, QKeySequence::Delete);
+    m_actionCollection->setDefaultShortcuts(deleteWithTrashShortcut, KStandardShortcut::moveToTrash());
     deleteWithTrashShortcut->setEnabled(false);
     connect(deleteWithTrashShortcut, &QAction::triggered, this, &DolphinViewActionHandler::slotDeleteItems);
 
@@ -172,6 +172,7 @@ void DolphinViewActionHandler::createActions()
     QActionGroup* sortByActionGroup = createFileItemRolesActionGroup(QStringLiteral("sort_by_"));
 
     KActionMenu* sortByActionMenu = m_actionCollection->add<KActionMenu>(QStringLiteral("sort"));
+    sortByActionMenu->setIcon(QIcon::fromTheme(QStringLiteral("view-sort")));
     sortByActionMenu->setText(i18nc("@action:inmenu View", "Sort By"));
     sortByActionMenu->setDelayed(false);