Change the build system to enable building with Qt 6

Ahmad Samir requested to merge work/ahmad/qt6 into master

This was built with: -DQT_MAJOR_VERSION=6

A QGlobalStatic(QMutex, foo) can't be used to directly construct a Q6MutexLocker (the latter is a function template in Qt6), instead use GlobalStatic::operator() to get a pointer to the underlying QMutex. This works in Qt5 and Qt6.

QChar implicit conversion from an int isn't allowed in Qt6.

Edited by Ahmad Samir

Merge request reports