From ec12391a1bb89a395a9f46a548154782664d0835 Mon Sep 17 00:00:00 2001 From: Roman Inflianskas Date: Sat, 10 Mar 2018 22:50:29 +0300 Subject: Convert hard coded shortcuts to standard keys Test Plan: Check all changed shortcuts on all platforms. Reviewers: #dolphin, rizzitello, elvisangelaccio Reviewed By: #dolphin, rizzitello, elvisangelaccio Subscribers: anthonyfieroni, ngraham, elvisangelaccio, rizzitello, #dolphin Differential Revision: https://phabricator.kde.org/D11048 --- src/dolphinpart.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/dolphinpart.cpp') diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp index e0f06bc5f..2e7f7639f 100644 --- a/src/dolphinpart.cpp +++ b/src/dolphinpart.cpp @@ -180,7 +180,7 @@ void DolphinPart::createActions() unselectItemsMatching->setText(i18nc("@action:inmenu Edit", "Unselect Items Matching...")); connect(unselectItemsMatching, &QAction::triggered, this, &DolphinPart::slotUnselectItemsMatchingPattern); - actionCollection()->addAction(KStandardAction::SelectAll, QStringLiteral("select_all"), m_view, SLOT(selectAll())); + KStandardAction::selectAll(m_view, &DolphinView::selectAll, actionCollection()); QAction* unselectAll = actionCollection()->addAction(QStringLiteral("unselect_all")); unselectAll->setText(i18nc("@action:inmenu Edit", "Unselect All")); @@ -216,11 +216,8 @@ void DolphinPart::createActions() goActionGroup); // Tools menu - m_findFileAction = actionCollection()->addAction(QStringLiteral("find_file")); + m_findFileAction = KStandardAction::find(this, &DolphinPart::slotFindFile, actionCollection()); m_findFileAction->setText(i18nc("@action:inmenu Tools", "Find File...")); - actionCollection()->setDefaultShortcut(m_findFileAction, Qt::CTRL + Qt::Key_F); - m_findFileAction->setIcon(QIcon::fromTheme(QStringLiteral("edit-find"))); - connect(m_findFileAction, &QAction::triggered, this, &DolphinPart::slotFindFile); #ifndef Q_OS_WIN if (KAuthorized::authorize(QStringLiteral("shell_access"))) { -- cgit v1.3