More Qt6 preparation work
Shouldn't affect Qt5 functionality, but some changes are not totally straightforward, so there's probably some risk of breaking things, too.
With these changes, compilation attempts with Qt6 provide less than 8000 lines of errors & warnings, which might sound a lot, but is actually a degree of magnitude less than a couple of weeks ago.
Edited by Tuomas Nurmi