D11048: Convert hard coded shortcuts to standard keys

Elvis Angelaccio noreply at phabricator.kde.org
Mon Mar 5 21:21:22 GMT 2018


elvisangelaccio requested changes to this revision.
elvisangelaccio added inline comments.

INLINE COMMENTS

> dolphinmainwindow.cpp:1053
>      newWindow->setText(i18nc("@action:inmenu File", "New &Window"));
> -    actionCollection()->setDefaultShortcut(newWindow, Qt::CTRL + Qt::Key_N);
> +    actionCollection()->setDefaultShortcut(newWindow, QKeySequence::New);
>      connect(newWindow, &QAction::triggered, this, &DolphinMainWindow::openNewMainWindow);

Please use `KStandardAction::New` for consistency with other KDE apps.

> dolphinmainwindow.cpp:1090
>      selectAll->setIcon(QIcon::fromTheme(QStringLiteral("edit-select-all")));
> -    actionCollection()->setDefaultShortcut(selectAll, Qt::CTRL + Qt::Key_A);
> +    actionCollection()->setDefaultShortcut(selectAll, QKeySequence::SelectAll);
>      connect(selectAll, &QAction::triggered, this, &DolphinMainWindow::selectAll);

Please use `KStandardAction::SelectAll`.

> dolphinmainwindow.cpp:1117
>      reload->setText(i18nc("@action:inmenu View", "Reload"));
> -    actionCollection()->setDefaultShortcut(reload, Qt::Key_F5);
> +    actionCollection()->setDefaultShortcut(reload, QKeySequence::Refresh);
>      reload->setIcon(QIcon::fromTheme(QStringLiteral("view-refresh")));

Please use `KStandardAction::Redisplay`.

> dolphinpart.cpp:221
>      m_findFileAction->setText(i18nc("@action:inmenu Tools", "Find File..."));
> -    actionCollection()->setDefaultShortcut(m_findFileAction, Qt::CTRL + Qt::Key_F);
> +    actionCollection()->setDefaultShortcut(m_findFileAction, QKeySequence::Find);
>      m_findFileAction->setIcon(QIcon::fromTheme(QStringLiteral("edit-find")));

Please use `KStandardAction::Find`.

REPOSITORY
  R318 Dolphin

REVISION DETAIL
  https://phabricator.kde.org/D11048

To: rominf, #dolphin, rizzitello, elvisangelaccio
Cc: elvisangelaccio, rizzitello, #dolphin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20180305/1e008137/attachment.htm>


More information about the kfm-devel mailing list