Revert "If QT_MAJOR_VERSION is not defined, use 5"
There is no path out of QtVersionOption.cmake that would let QT_MAJOR_VERSION undefined, so this check is unnecessary. Worse, this doesn't actually check for QT_MAJOR_VERSION being defined, but whether a variable named after the content of the QT_MAJOR_VERSION variable is defined. That is always false, so this effectively forces Qt5 and breaks Qt6 support.
This reverts commit 8fd79163.