QDoc: Qualify template enum value table terms
The template generators render the constant column of an enum value
table exactly as the `\value` argument was authored. That omits the
scope entirely, so the template output shows bare constant names. The
legacy generators' output shows the same constants qualified with the
scope in which the enum was declared.
This change ensures that the TemplateGenerator's value tables also
qualify values with the enum's declaration scope. A related nonmember
keeps the scope in which its enum was declared, scoped enums include
the enum name, and QML values that already carry a prefix keep it.
Value tables of non-enum nodes, such as enumeration properties, are
left as authored. The test expectations document the qualified names
for related, nested, and QML enums.
Fixes: QTBUG-151108
Pick-to: 6.12
Change-Id: I8dfc1cb2cd56be249b46be4d237c7a3abe7307ce
Reviewed-by: David Boddie <david.boddie@qt.io>
| commit | 57ec713f38662580535b08bfcf0b106f474e250d |
| parent | aaa1ba6136331d22b60aeb1b28ece35a9156b52e |
| author | Paul Wicking <paul.wicking@qt.io> |
| committer | Paul Wicking <paul.wicking@qt.io> |
| commit time | Mon, 5 Oct 2026 16:50:29 +0000 |
- M src/qdoc/qdoc/src/qdoc/enumnode.cpp
- M src/qdoc/qdoc/src/qdoc/enumnode.h
- M src/qdoc/qdoc/src/qdoc/nodeextractor.cpp
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/cppref_validation/expected/html/qcoapmessage.html
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/cppref_validation/expected/html/qcoapoption.html
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/cppref_validation/expected/html/qtcoap.html
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/cppref_validation/expected/markdown/qcoapmessage.md
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/cppref_validation/expected/markdown/qcoapoption.md
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/cppref_validation/expected/markdown/qtcoap.md
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/relates_scope/expected/relatesscope.index
- A src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/relates_scope/expected/template-html/ns-gadget-members.html
- A src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/relates_scope/expected/template-html/ns-gadget.html
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/relates_scope/expected/template-html/ns.html
- A src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/relates_scope/expected/template-html/qml-qmlscope-thing-members.html
- A src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/relates_scope/expected/template-html/qml-qmlscope-thing.html
- A src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/relates_scope/expected/template-html/qmlscope-qmlmodule.html
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/relates_scope/expected/template-html/relatesscope-module.html
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/relates_scope/expected/template-html/widget.html
- A src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/relates_scope/src/qmlscope.qdoc
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/relates_scope/src/widget.cpp
- M src/qdoc/qdoc/tests/validatetemplategeneratoroutput/testdata/relates_scope/src/widget.h