Details
-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
None
-
5.15.10
Description
When running the code below
int dataOriginal = 0x80000001; QString dataStr = QString::number(dataOriginal, 16); bool ok; int dataInt = dataStr.toInt(&ok, 16);
the result ends up
Qt 5.15.10
dataOriginal : (hex) ffffffff080000001 dataStr : "ffffffff080000001" dataInt : 0 ok : false
As a reference the result in Qt6.3.1 is
dataOriginal : (hex) ffffffff080000001 dataStr : "-7fffffff" dataInt : (hex) ffffffff080000001 ok : true
How to reproduce
- Use Qtbug105879.zip .
- Put a breakpoint to line 17 ( return a.exec(); )
Attachments
Issue Links
- relates to
-
QTBUG-53706 QString::number(-17, 16) should return "-11" not "0xffffffffffffffef"
- Closed