Previously, the Mumble version was encoded with a uint32
in the network protocol reserving 2 bytes for the major
component and 1 byte for each minor and patch.
The versioning format was changed to include a build
number in the patch field. With a recent update (1.4.274)
the patch field exceeded 255 for the first time and broke
the protocol version.
This commit completely reworks how the version is stored
internally and transfered with the network protocol.
The new version is a uint64 and consists of 4 fields with
2 bytes each. This allows each version component to reach
up to 65535. Furthermore, all instances of integer version
types have been replaced with the alias Version::full_t for
a better abstraction. Version literals have been replaced by
Version::fromComponents calls.
Fixes#5827
7a96dc46e6 adapted the used RegEx to
include support for build-numbers. This however was done without keeping
the option for not specifying a build number (as done for the versions
used in Mumble URLs for instance).
This commit adapts the RegEx such that the build number is now optional.
Fixes#4684
27471118b5 introduced support for the 4th part (build/tweak) of the version, however:
1. It didn't replace all instances of MUMBLE_VERSION_STRING with MUMBLE_VERSION.
2. It accidentally replaced MUMBLE_VERSION_STRING with MUMBLE_RELEASE_ID in MumbleVersion::get()'s signature.
3. It didn't update the regex expression in MumbleVersion::get() to support 4 digits.
This commit fixes all issues listed above.
This commit adds all the missing includes when the PCH header is not used.
Also, some includes are reordered and/or made consistent (e.g. "#include <QtEndian>" -> "#include <QtCore/QtEndian>").
According to Qt's documentation the PCH header doesn't need to be included.
From https://doc.qt.io/qt-5/qmake-precompiledheaders.html:
"To make your project use precompiled headers, you only need to define the PRECOMPILED_HEADER variable in your project file."
"qmake will handle the rest, to ensure the creation and use of the precompiled header file. You do not need to include the precompiled header file in HEADERS, as qmake will do this if the configuration supports precompiled headers."