Description: Fix duplicate "Quick Run" entry in the Tools menu
 The compile-and-run action was being auto-added to the Tools menu by
 Kate's plugin system regardless of the XML gui definition, creating a
 second entry alongside the destination submenu. The action was removed
 from the action collection (kept only for icon/text mirroring) and the
 Ctrl+F5 shortcut was moved to the destination KActionMenu, which is now
 the only action shown in the menu.
Author: Wyllian Bezerra da Silva <wyllianbs@gmail.com>
Forwarded: not-needed
Last-Update: 2026-09-08

--- kate-quickrun-1.0.1.orig/kate-quickrun.cpp
+++ kate-quickrun-1.0.1/kate-quickrun.cpp
@@ -820,11 +820,9 @@ KateRunPluginView::KateRunPluginView(Kat
 
     setComponentName(QStringLiteral("kate-quickrun"), i18n("Quick Run"));
 
-    m_runAction = actionCollection()->addAction(QStringLiteral("katerun_compile_and_run"));
+    m_runAction = new QAction(this);
     m_runAction->setText(i18nc("Menu option to run code", "Quick Run"));
 
-    actionCollection()->setDefaultShortcut(m_runAction, QKeySequence(Qt::CTRL | Qt::Key_F5));
-
     // Indicador de "visível" é dado pelo ícone de check (ver updateTerminalActions),
     // não pelo checkbox nativo; keepMenuOpen mantém o menu aberto ao alternar.
     m_toggleTerminalAction = actionCollection()->addAction(QStringLiteral("katerun_toggle_terminal"));
@@ -854,9 +852,8 @@ KateRunPluginView::KateRunPluginView(Kat
         "<gui name=\"kate-quickrun\" version=\"11\">\n"
         "  <MenuBar>\n"
         "    <Menu name=\"tools\">\n"
-        "      <Action name=\"katerun_compile_and_run\"/>\n"
-        "      <Action name=\"katerun_toggle_terminal\"/>\n"
         "      <Action name=\"katerun_destination\"/>\n"
+        "      <Action name=\"katerun_toggle_terminal\"/>\n"
         "      <Action name=\"katerun_close_terminal\"/>\n"
         "    </Menu>\n"
         "  </MenuBar>\n"
@@ -910,6 +907,7 @@ void KateRunPluginView::buildDestination
     menu->setPopupMode(QToolButton::MenuButtonPopup);
     menu->setToolTip(i18n("Compiles and runs the current file. Use the arrow to choose the run destination."));
     actionCollection()->addAction(QStringLiteral("katerun_destination"), menu);
+    actionCollection()->setDefaultShortcut(menu, QKeySequence(Qt::CTRL | Qt::Key_F5));
     connect(menu, &QAction::triggered, this, &KateRunPluginView::runCode);
     m_destinationAction = menu;
 
