[Development] On ensuring that private headers include at least one other

Sze Howe Koh szehowe.koh at gmail.com
Tue Jun 24 07:56:37 CEST 2025


A few years ago, our private headers were updated to include
qglobal_p.h. Examples:
* https://codereview.qt-project.org/c/qt/qtbase/+/121135
* https://codereview.qt-project.org/c/qt/qtdeclarative/+/395249

The commit messages say, "See script in qtbase/util/includeprivate for
the rules", but I wasn't able to find this script.

1. What's the rationale for #include-ing private headers like this?
2. Is a copy of the script published somewhere? Should the script be
pushed to qtbase/util/includeprivate as advertised?
3. Should the rules be enshrined in a QUIP, and/or should the Sanity
Bot be given a new job?


Regards,
Sze-Howe


More information about the Development mailing list