This PR reverts commit 0c63f808542ba02fc41aa90b1d96e9123f16d8ad (#18738), because the initial issue is no longer a thing.
Tested on the following systems:
- Ubuntu Focal + Qt 5.12.8:
- ~gcc 9.3.0~ test is wrong
- clang 10.0.0
- clang 11.0.0
- Fedora 34 + Qt 5.15.2
- gcc 11.1.1
- clang 12.0.0
Although, did not test this configuration.
Closes #18967.