Commit 36640aa0 authored by Alex Blasche's avatar Alex Blasche Committed by Jani Heikkinen
Browse files

Don't enforce all QMetaType::TypeFlag difference across Qt versions


QMetaType::IsGadget was introduced in Qt 5.5 and set when Q_GADGET is used.
If an existing Qt 5.4 class was converted to a gadget in Qt 5.5+,
the two types would have differing QMetaType::TypeFlags. Such a conversion
happened for QGeoCoordinate, QGeoShape, QGeoRectangle
and QGeoCircle. There might be other classes too.

In principle, the same problem exists for every future addition to
QMetaType::TypeFlag too. This patch ensures that new flags are kept in
the metatype database and the related qFatal call is not triggered for any
flag >= TypeFlag::WasDeclaredAsMetaType.

Change-Id: Ibb15daeb28d9a11b7f31658f4219cbca2499213f
Task-number: QTBUG-46454
Reviewed-by: default avatarAlex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: default avatarOlivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
parent 81054b11
Branches
Tags
No related merge requests found
Showing with 14 additions and 4 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment