Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.5.0 RC
-
None
-
-
8570e86ff (dev), 22943b3a3 (6.5.0), 298657409 (6.5)
Description
When having a custom QObject subclass the typeid is not known to QMetaType::type() in Qt 6.5.0 RC anymore unless something has fetched the typeid from a wrapped QVariant before.
The following code reproduces this (complete code is attached)
CustomQObject customObject; // simple subclass from QObject, including a Q_OBJECT macro const QVariant customVariant = QVariant::fromValue(&customObject); assert(QMetaType::type("CustomQObject*") != 0); // fails on 6.5.0 RC, works on 6.4.0 and earlier assert(customVariant.userType() != 0); assert(QMetaType::type("CustomQObject*") != 0);
This is a problem for Squish when trying to find out if a referenced QVariant can be converted into such a custom type because Squish first asks the QMetaType registry about the custom type before extracting it from a QVariant. All of this has to be done using strings and integer type ids in Squish since it does not and cannot directly access the C++ types from the application it is testing.
Attachments
Issue Links
- mentioned in
-
Page Loading...