summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qtyperevision.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QTypeRevision: use comparison helper macrosIvan Solovev2024-03-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | QTypeRevision consists of two quint8 values: major and minor version. Each of the versions can be unknown. The rules for comparing with the unknown version are as follows: zero version < unknown version < non-zero version At the same time, two unknown versions are considered equal. This makes the comparison a bit tricky, but it still fits into the category of strong ordering. Replace the existing friend relational operators with helper functions and comparison helper macros, making this type strongly ordered. Update the unit-tests to use the new comparison helper test functions. As the test functions check the reversed arguments as well, we can reduce the number of rows for the data-driven comparison test. Fixes: QTBUG-120359 Change-Id: Ib6f1037fc7b5fed148e35ee48b56b05dcd36b3b4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
* Dissociate QTypeRevision from QVersionNumberMarc Mutz2024-01-101-0/+216
They have nothing to do with each other, so give QTypeRevision its own header and implementation file instead of piggy-backing on QVersionNumber's. Picking back to current LTS to incur the merge conflict only once, not per (expected) follow-up change. Amends ed080c64ae21d22115d16780a5903d7cc4fd1546. Pick-to: 6.7 6.6 6.5 Change-Id: I2fa5d0e68f95864126bc95e3d8154134eee85553 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>