Fix issues with "Select All" (search results)

- the shortcut Alt+Return conflicts with "Trigger Refactoring Action"
- display the shortcut in find toolbar button's tooltip
- no need to repeat the default shortcut (it's the same Command)

Change-Id: Ifd1e56ba091806901241bdca66c42a332574bc0c
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Eike Ziller
2022-01-25 14:17:55 +01:00
parent 3a9ce46928
commit a4b3085acb

View File

@@ -224,12 +224,12 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind)
m_selectAllAction = new QAction(tr("Select All"), this);
cmd = ActionManager::registerAction(m_selectAllAction, Constants::FIND_SELECT_ALL);
cmd->setDefaultKeySequence(QKeySequence(tr("Alt+Return")));
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Alt+Return")));
mfind->addAction(cmd, Constants::G_FIND_ACTIONS);
connect(m_selectAllAction, &QAction::triggered, this, &FindToolBar::selectAll);
m_localSelectAllAction = new QAction(m_selectAllAction->text(), this);
cmd = ActionManager::registerAction(m_localSelectAllAction, Constants::FIND_SELECT_ALL, findcontext);
cmd->setDefaultKeySequence(QKeySequence(tr("Alt+Return")));
cmd->augmentActionWithShortcutToolTip(m_localSelectAllAction);
connect(m_localSelectAllAction, &QAction::triggered, this, &FindToolBar::selectAll);
m_ui.selectAllButton->setDefaultAction(m_localSelectAllAction);