- 
    
Bug
 - 
    Resolution: Done
 - 
    
P1: Critical
 - 
    5.0.0
 - 
    None
 
- 
        I0408293e43c3330dbc4746198a19709e795f552a
 
Commit 7934c75f844dd9a42315b18870cc72dd3e17191a (gerrit https://codereview.qt-project.org/#change,14462) in qtbase changed the mapping of old Qt 3 types to return 0 for QColorGroups but this breaks QVariant::save(QDataStream &s) when saving an invalid QVariant. The save() method will now lookup a typeId of 12 instead of 0 because the loop iterating over that map starts at the end.
When reading this data with a QDataStream in Qt < 5 it will result in a QVariant holding a QColorGroup instead of being an invalid variant, this breaks communication between Qt 3/4 and Qt 5 applications when they also rely on invalid QVariants as part of their protocol.
Attached is a minimal example that verifies the first few bytes. Byte 4 should be 0 instead of 12. When compiling this with Qt 4 everything is fine, with Qt 5 the last assertion does not hold true.
- is required for
 - 
                    
QTBUG-27426 Qt 5.0 Final release tasks
-         
 - Closed
 
 -         
 
| For Gerrit Dashboard: QTBUG-27700 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V | 
| 40002,3 | Fix QVariant streaming in Qt3 compatibility mode. | master | qt/qtbase | Status: MERGED | +2 | 0 |