Details
-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
6.7.2
-
None
-
gcc (Debian 12.2.0-14) 12.2.0
-
-
ddfcc0734 (dev), a572b4b07 (dev), 43003ccbc (6.8), 4f30a4426 (6.8), 9aa8aa273 (6.7), 6547988c2 (6.7), 906fa7738 (tqtc/lts-6.5), d38b77fd1 (tqtc/lts-6.5)
Description
The following code runs into an assertion, when Qt has been built in debug mode.
( void )QTypeRevision::fromVersion( 'X', 'Y' );
ASSERT: "isValidSegment(majorVersion)" in file /opt/qt/Qt-6.7.2d/include/QtCore/qtyperevision.h
Obviously the template does not work properly for characters:
( int )std::numeric_limits<char>::max() -> 128
( int )char(0xff) -> -1
Casting the characters to quint8 ( my workaround ) avoids the issue.
Attachments
For Gerrit Dashboard: QTBUG-128848 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
590315,2 | tst_QTypeRevision: rewrite using if constexpr and direct calls | dev | qt/qtbase | Status: MERGED | +2 | 0 |
590316,3 | QTypeRevision: fix support for 8-bit signed segments | dev | qt/qtbase | Status: MERGED | +2 | 0 |
590972,2 | tst_QTypeRevision: rewrite using if constexpr and direct calls | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |
590974,2 | QTypeRevision: fix support for 8-bit signed segments | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |
590986,2 | tst_QTypeRevision: rewrite using if constexpr and direct calls | 6.7 | qt/qtbase | Status: MERGED | +2 | 0 |
590990,2 | QTypeRevision: fix support for 8-bit signed segments | 6.7 | qt/qtbase | Status: MERGED | +2 | 0 |
591001,2 | tst_QTypeRevision: rewrite using if constexpr and direct calls | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
591023,2 | QTypeRevision: fix support for 8-bit signed segments | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |