Replies: 1 comment
|
Opened #678 for question 3 — the parts that don't depend on the menu-structure decision. It covers:
Two things I checked rather than assumed, in case they're useful to a reviewer:
Still open here: questions 1, 2 and 4 — whether "every feature is in a menu" is the rule we want, where the add-item actions should live (restore The two toolbar-only drawing families are the substance of this audit and I've deliberately kept them out of #678, since they're a menu-structure call rather than a code one. Happy to do that work once there's a direction. |
Uh oh!
There was an error while loading. Please reload this page.
I had a suspicion that some QET features are only reachable from a toolbar, a
context menu or a shortcut, and never appear in the menu bar. I checked it
properly rather than guessing: I diffed every
QActionagainst every menu, inall three editors.
The suspicion was right, and the interesting part is that this is drift, not a
design decision — two of the three editors are already complete:
qetelementeditor.uiSo there is already a house convention of "everything is in the menus". The gaps
are all in code that was added after the menus were written.
All line references below are against master
7307a59c1.A. A whole feature family is toolbar-only
m_add_item_actions_groupis created atqetdiagrameditor.cpp:707-713and addedto
m_add_item_tool_barat:818. It is added to no menu anywhere:Since that toolbar is user-hideable (Configuration → Afficher), hiding it makes
all seven features unreachable — there is no menu entry, no shortcut and no
context-menu entry for any of them.
There is a fossil suggesting this was already noticed.
qetdiagrameditor.cpp:841:// QMenu *menu_outils = new QMenu(tr("O&utils"), this);A Tools menu was started and commented out.
B. The same gap in the element editor
Same pattern, different file.
m_add_part_action_grp(
qetelementeditor.cpp:1050-1057) — line, rectangle, ellipse, polygon, text,arc, terminal, dynamic text field — is added only to
parts_toolbarat:1079.The
.uifile is a perfect 37/37. The eight drawing actions were added in C++later and never made it into the menus.
In both editors, the toolbar-only family is the drawing primitives. That is
consistent enough to look like the same oversight repeated.
C. Two toggles that are inconsistent with their neighbours
Grid and guides are adjacent lines doing the same kind of thing, and only one of
them is in the menu.
m_auto_conductoris the odder one: it writes a project setting(
project()->setAutoConductor()) but has no entry in the Projet menu.D. Context-menu-only actions
Created in
DiagramView, surfaced nowhere else:diagramview.cpp:81:84:91The last one is the only way to author a
.qetmakmacro, and it is reachableonly by right-clicking a selection.
E. Collections panel — 12 context-menu-only actions
elementscollectionwidget.cpp:150-177. Most of these are arguably fine ascontext actions, but one stands out: "Importer une pièce EPLAN (.edz)…".
That is a whole import subsystem, with its own parser, reachable only by
right-clicking inside the collection tree. Also there: Nouvel élément, Nouveau
dossier, Recharger les collections.
F. The most hidden feature I found
diagramview.cpp:616— "Connecter les bornes sélectionnées".It is constructed as a transient
QActioninsidemouseReleaseEvent, and onlyappears if you make a free-rubberband selection that happens to produce more
than three points. No menu, no toolbar, no shortcut — the action does not exist
as an object until that moment.
I only found it by reading the code. I would be curious how many users know it
is there.
G. Two dead members
conductor_defaultandm_project_folio_list(qetdiagrameditor.h:194and:202) are declared but never allocated and never referenced anywhere in thetree. Uninitialised raw pointers; harmless today since nothing dereferences
them, but worth removing.
Two things that are fine
Flagging these so nobody spends effort on them:
QETMainWindow::checkToolbarsmenu()(
qetmainwindow.cpp:234) injects Qt'screatePopupMenu()intoConfiguration → Afficher. I expected this to be missing and it is not.
Proposed fix
Mostly
addActionlines insetUpMenu():Outils, or a new Insertion menu. Same for the element editor's eight
drawing actions in its
.ui.m_draw_guidesnext tom_draw_gridin Affichage;m_auto_conductorintoProjet.
Coller iciandCollage multipleinto Édition near Coller;Créer un templateinto Projet.Importer une pièce EPLAN (.edz)…into Fichier, ideally under an Importsubmenu.
Questions before I write any of it
because two of the three editors already satisfy it, but it is worth stating
explicitly rather than inferring it.
Outils, or a newInsertionmenu? Items 1, 3 and 4 together add roughly 15 entries to menusthat are currently quite lean, so this is a menu-structure decision more than
a code one, and I would rather agree it here than propose it in a diff.
uncontroversial — one missing toggle, one project setting, two dead members —
and they do not depend on the structural decision in question 2.
If it is deliberate I will leave it alone, but it currently has no
discoverable path at all.
Happy to do the work — I would just rather settle 1 and 2 before opening a PR
that rearranges menus.
All reactions