Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit cd91625e authored by Thomas Schöps's avatar Thomas Schöps

Snippets: Fix the keyboard shortcuts for new snippets not working

Summary: After creating a new snippet with an assigned keyboard shortcut, this shortcut did not work directly. This was because the snippet QActions are added to a widget by a rowsInserted() signal, but the new snippet's QAction did not exist yet at this time. This change ensures that the new snippet's QAction is created in time.

Test Plan: I tested it manually.

Reviewers: #kate, cullmann

Reviewed By: #kate, cullmann

Subscribers: cullmann, kwrite-devel

Tags: #kate

Differential Revision:
parent f8c1d8fe
......@@ -174,6 +174,7 @@ void EditSnippet::save()
if ( !m_snippet ) {
// save as new snippet
m_snippet = new Snippet();
m_snippet->action(); // ensure that the snippet's QAction is created before it is added to a widget by the rowsInserted() signal
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