QDoc: Apply metacommands to properties once
When a single comment documents several QML properties, each
metacommand in that comment is applied to every property twice. Most
commands can be applied repeatedly, so the duplication is invisible.
An `\overload` doesn't apply to properties, however. Each application
emits a spurious "Ignored '\overload'" warning. This can push a
project past its warning limit and fail the build. `\deprecated` with
a version has a subtler effect. Setting the version twice produces a
diagnostic message for every property.
This change makes QDoc apply the metacommands of such a comment
once per property, as it already does for shared function and QML
method comments. The generated documentation is unchanged. Projects
that document several properties in one comment no longer receive
duplicate warnings and diagnostics.
Pick-to: 6.12
Fixes: QTBUG-151323
Change-Id: Ie17f02ed1e56331c97888361588d9c443a914061
Reviewed-by: Topi Reinio <topi.reinio@qt.io>
Reviewed-by: David Boddie <david.boddie@qt.io>
| commit | 8fec5cf010d950e62a235b71ad73c1692970c7f6 |
| parent | cb31974a4356dbf0c02ec00a217825681d22c2a1 |
| author | Paul Wicking <paul.wicking@qt.io> |
| committer | Paul Wicking <paul.wicking@qt.io> |
| commit time | Mon, 12 Oct 2026 15:43:24 +0000 |
- M src/qdoc/qdoc/src/qdoc/cppcodeparser.cpp
- A src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/qml_shared_property_metacommands/expected/html/metacommands-qmlmodule.html
- A src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/qml_shared_property_metacommands/expected/html/qml-metacommands-widget-members.html
- A src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/qml_shared_property_metacommands/expected/html/qml-metacommands-widget.html
- A src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/qml_shared_property_metacommands/expected/html/sharedpropertymetacommands.index
- A src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/qml_shared_property_metacommands/qml_shared_property_metacommands.qdocconf
- A src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/qml_shared_property_metacommands/src/types.qdoc