Register jump-to-element (Ctrl+G) with ShortcutManager

m_jump_to_element was the only action in the tree that set its
QKeySequence directly instead of going through
ShortcutManager::registerAction() -- of 98 actions carrying a runtime
shortcut, 95 matched a registerAction() call, 2 were Qt built-ins, and
this was the sole exception (verified by dumping every QAction from a
running instance and cross-checking against a static scan of the
source; the only other setShortcut() call in the tree clears a
shortcut rather than setting one).

Bypassing the registry meant the binding didn't appear on the
Shortcuts preferences page (so it couldn't be discovered or rebound),
and checkConflicts() couldn't see it either, so assigning Ctrl+G to
another action there would silently collide at runtime instead of
being flagged.

Fixes #758.
This commit is contained in:
ispyisail
2026-08-23 21:26:00 +12:00
parent 759b197dc2
commit 9d590eaa6f
+1 -1
View File
@@ -778,7 +778,7 @@ void QETDiagramEditor::setUpActions()
});
m_jump_to_element = new QAction(tr("Atteindre un élément"), this);
m_jump_to_element->setShortcut(Qt::CTRL | Qt::Key_G);
ShortcutManager::instance().registerAction(m_jump_to_element, "diagrameditor.jump_to_element", tr("Éditeur de schémas"), Qt::CTRL | Qt::Key_G);
m_jump_to_element->setStatusTip(tr("Recherche et sélectionne rapidement un élément du folio", "status bar tip"));
connect(m_jump_to_element, &QAction::triggered, [this]()
{