Commit 0aa7c4d3 authored by Christoph Cullmann's avatar Christoph Cullmann

Kate: Keyboard shortcuts F6/Shift+F6 for Next/Previous Match

Summary:
NOTE: depends on https://phabricator.kde.org/D17442

For the Search and Replace plugin use these default shortcuts as in Qt Creator:
- F6: Next Match
- Shift+F6: Previous Match

Remove unnecessary F keys:

- Remove default shortcuts F8 and F9 from the Replicode Plugin. F8 conflicts with a split view shortcut and F9 can stay free.
- Maybe also remove the F8 split view shortcut to make way for a non-F key variant

Reviewers: #kate, cullmann

Reviewed By: #kate, cullmann

Subscribers: cullmann, loh.tar, sars, dhaumann, kwrite-devel

Tags: #kate

Differential Revision: https://phabricator.kde.org/D17443
parent fac21b07
......@@ -5,12 +5,12 @@
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
......@@ -54,12 +54,10 @@ ReplicodeView::ReplicodeView(KTextEditor::Plugin *plugin, KTextEditor::MainWindo
m_executor(nullptr)
{
m_runAction = new QAction(QIcon(QStringLiteral("code-block")), i18n("Run replicode"), this);
actionCollection()->setDefaultShortcut(m_runAction, Qt::Key_F8);
connect(m_runAction, &QAction::triggered, this, &ReplicodeView::runReplicode);
actionCollection()->addAction(QStringLiteral("katereplicode_run"), m_runAction);
m_stopAction = new QAction(QIcon(QStringLiteral("process-stop")), i18n("Stop replicode"), this);
actionCollection()->setDefaultShortcut(m_stopAction, Qt::Key_F9);
connect(m_stopAction, &QAction::triggered, this, &ReplicodeView::stopReplicode);
actionCollection()->addAction(QStringLiteral("katereplicode_stop"), m_stopAction);
m_stopAction->setEnabled(false);
......
......@@ -251,10 +251,12 @@ m_mainWindow (mainWin)
a = actionCollection()->addAction(QStringLiteral("go_to_next_match"));
a->setText(i18n("Go to Next Match"));
actionCollection()->setDefaultShortcut(a, QKeySequence(Qt::Key_F6));
connect(a, &QAction::triggered, this, &KatePluginSearchView::goToNextMatch);
a = actionCollection()->addAction(QStringLiteral("go_to_prev_match"));
a->setText(i18n("Go to Previous Match"));
actionCollection()->setDefaultShortcut(a, QKeySequence(Qt::SHIFT + Qt::Key_F6));
connect(a, &QAction::triggered, this, &KatePluginSearchView::goToPreviousMatch);
m_ui.resultTabWidget->tabBar()->setSelectionBehaviorOnRemove(QTabBar::SelectLeftTab);
......
......@@ -1021,7 +1021,7 @@ void KateViewManager::restoreViewConfiguration(const KConfigGroup &config)
* delete mapping of now deleted views
*/
m_views.clear();
/**
* kill all previous existing sub-splitters, just to be sure
* e.g. important if one restores a config in an existing window with some splitters
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment