QDoc: Accept const aggregates in section construction


The section infrastructure accepts mutable aggregate pointers
even though it never modifies the aggregate. Callers that hold
const references must cast away the qualifier to construct
section listings. This undermines the compiler's ability to
verify that documentation generation is a read-only operation.

Section and Sections classes accept const-qualified aggregate
pointers, documenting the read-only contract at the type level.
A const overload on the related-by-proxy accessor enables const
propagation through inherited member iteration.

Task-number: QTBUG-145109
Change-Id: I8b7a16b6019a0f39876ae4ac3380ac5ac7271de8
Reviewed-by: Topi Reinio <topi.reinio@qt.io>
commite722ceb0b57a8ce4b61fd9641ee089afbc507c8e
parentc3b151eb6b1d8135c9d024df58a462169d691fce
authorPaul Wicking <paul.wicking@qt.io>
committerPaul Wicking <paul.wicking@qt.io>
commit timeMon, 23 Mar 2026 18:43:16 +0100