Commit 5b852134 authored by Gregor Mi's avatar Gregor Mi

Correct usage of KActionCollection

Summary:
Fixes this warning: "Shortcut for action
"katekonsole_tools_toggle_focus" "&Focus Terminal" set with
QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s)
instead."

Reviewers: #kate, cullmann

Reviewed By: #kate, cullmann

Subscribers: kwrite-devel

Tags: #kate

Differential Revision: https://phabricator.kde.org/D16821
parent 03d1c987
......@@ -149,7 +149,7 @@ KateConsole::KateConsole (KateKonsolePlugin* plugin, KTextEditor::MainWindow *mw
a = actionCollection()->addAction(QStringLiteral("katekonsole_tools_toggle_focus"));
a->setIcon(QIcon::fromTheme(QStringLiteral("utilities-terminal")));
a->setText(i18nc("@action", "&Focus Terminal"));
a->setShortcut(QKeySequence(Qt::Key_F4));
actionCollection()->setDefaultShortcut(a, QKeySequence(Qt::Key_F4));
connect(a, &QAction::triggered, this, &KateConsole::slotToggleFocus);
m_mw->guiFactory()->addClient (this);
......
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