Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.0, 6.1.0, 6.2.0 Beta4
-
None
-
-
46dc8e453a (qt/qtbase/dev) 46dc8e453a (qt/tqtc-qtbase/dev) f3842c09b7 (qt/qtbase/6.2) 4263ea6169 (qt/qtbase/6.3) f3842c09b7 (qt/tqtc-qtbase/6.2) 4263ea6169 (qt/tqtc-qtbase/6.3)
Description
I have a complex QVariantMap data structure and serialize it to QDataStream in one shot as below:
stream << map;
Some values of the data structure are of type PairDouble, which is an alias for QPair<double, double>:
using PairDouble = QPair<double, double>;
Q_DECLARE_METATYPE(PairDouble);
The problem I faced is that my app built with Qt5 and Qt6 produces mutually incompatible files, because the app built with Qt6 prints "QVariant::load: unknown user type with name PairDouble" and the app built with Qt5 outputs "QVariant::load: unknown user type with name std::pair<double,double>".
I suppose that the problem is in making QPair an alias for std::pair (see https://bugreports.qt.io/browse/QTBUG-80309).
Attachments
For Gerrit Dashboard: QTBUG-96916 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
373506,6 | QVariant: use a typedef name when saving user types to QDataStream | dev | qt/qtbase | Status: MERGED | +2 | 0 |
387200,2 | QVariant: use a typedef name when saving user types to QDataStream | 6.3 | qt/qtbase | Status: MERGED | +2 | 0 |
387201,2 | QVariant: use a typedef name when saving user types to QDataStream | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |
389126,2 | QVariant: fix incorrect warning about duplicated alias where there isn't | dev | qt/qtbase | Status: MERGED | +2 | 0 |
389838,2 | QVariant: fix incorrect warning about duplicated alias where there isn't | 6.3 | qt/qtbase | Status: MERGED | +2 | 0 |
389839,2 | QVariant: fix incorrect warning about duplicated alias where there isn't | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |