void DolphinMainWindow::openNewMainWindow()
{
- KRun::run(QStringLiteral("dolphin %u"), QList<QUrl>(), this);
+ Dolphin::openNewWindow({}, this);
}
void DolphinMainWindow::openNewActivatedTab()
}
if (!newWindowUrl.isEmpty()) {
- KRun::run(QStringLiteral("dolphin %u"), {newWindowUrl}, this);
+ Dolphin::openNewWindow({newWindowUrl}, this);
}
}
changeUrl(KIO::upUrl(item.url()));
break;
- case DolphinContextMenu::OpenParentFolderInNewWindow: {
-
- KRun::run(QStringLiteral("dolphin %u"), {KIO::upUrl(item.url())}, this);
+ case DolphinContextMenu::OpenParentFolderInNewWindow:
+ Dolphin::openNewWindow({KIO::upUrl(item.url())}, this);
break;
- }
case DolphinContextMenu::OpenParentFolderInNewTab:
openNewTab(KIO::upUrl(item.url()));
SLOT(undo()),
actionCollection());
- // need to remove shift+del from cut action, else the shortcut for deletejob
- // doesn't work
- QAction* cut = KStandardAction::cut(this, SLOT(cut()), actionCollection());
- auto cutShortcuts = cut->shortcuts();
- cutShortcuts.removeAll(QKeySequence(Qt::SHIFT | Qt::Key_Delete));
- actionCollection()->setDefaultShortcuts(cut, cutShortcuts);
+
+ KStandardAction::cut(this, SLOT(cut()), actionCollection());
KStandardAction::copy(this, SLOT(copy()), actionCollection());
QAction* paste = KStandardAction::paste(this, SLOT(paste()), actionCollection());
// The text of the paste-action is modified dynamically by Dolphin
KActionCollection* col = actionCollection();
QAction* renameAction = col->action(QStringLiteral("rename"));
QAction* moveToTrashAction = col->action(QStringLiteral("move_to_trash"));
- QAction* deleteAction = col->action(QStringLiteral("delete"));
+ QAction* deleteAction = col->action(KStandardAction::name(KStandardAction::DeleteFile));
QAction* cutAction = col->action(KStandardAction::name(KStandardAction::Cut));
QAction* deleteWithTrashShortcut = col->action(QStringLiteral("delete_shortcut")); // see DolphinViewActionHandler