You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to #3351 (closed). This is the issue's Phase 3, which it explicitly marked "optional, later" — filing it so the idea isn't lost, not because it's load-bearing.
Idea
buildMenuBar() (now in MainWindow_Menus.cpp, ~1,000 lines) and registerShortcutActions() (in MainWindow_Shortcuts.cpp, ~560 lines) are long imperative sequences of near-identical addAction(...) + connect(...) / registerAction(...) calls. Much of that repetition could collapse into a data table (id, label, shortcut, handler, enable-predicate) walked by a small builder loop.
Why it's optional / low priority
Pure ergonomics — no behavior change, no architectural unlock, no bug.
Table-driving menus is a readability nicety with real risk of subtle behavior drift (action ordering, conditional enables, lambda captures) for modest payoff. Only worth doing if someone's already deep in the menu/shortcut code for another reason.
If pursued
Start with registerShortcutActions() — it's the more regular of the two (the shortcut registry already has a uniform registerAction(id, name, category, …) shape).
Menus are messier (submenus, separators, dynamic/conditional items, the contributors-fetch lambda) and may not table-drive cleanly — partial conversion is fine.
Behavior-preserving; full menu-walk + shortcut QA required.
No urgency. Closeable as wontfix if the team decides the repetition isn't worth touching.
Follow-up to #3351 (closed). This is the issue's Phase 3, which it explicitly marked "optional, later" — filing it so the idea isn't lost, not because it's load-bearing.
Idea
buildMenuBar()(now inMainWindow_Menus.cpp, ~1,000 lines) andregisterShortcutActions()(inMainWindow_Shortcuts.cpp, ~560 lines) are long imperative sequences of near-identicaladdAction(...) + connect(...)/registerAction(...)calls. Much of that repetition could collapse into a data table (id, label, shortcut, handler, enable-predicate) walked by a small builder loop.Why it's optional / low priority
If pursued
registerShortcutActions()— it's the more regular of the two (the shortcut registry already has a uniformregisterAction(id, name, category, …)shape).No urgency. Closeable as wontfix if the team decides the repetition isn't worth touching.
Refs #3351