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).