Details
-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
6.3
Description
I see the following output by QVariant::setValue() and functions alike:
// QT_NAMESPACE=TestNamespace TestNamespace::HelloWorld *obj = new TestNamespace::HelloWorld(&e, parent); QVariant var; // or " = QVariant::fromValue(obj)" var.setValue(obj); // asserts here QVERIFY(var.isValid());
In this particular case, the assertion is:
ASSERT failure in qRegisterNormalizedMetaType: "qRegisterNormalizedMetaType was called with a not normalized type name, please call qRegisterMetaType instead.", file /home/ag/work/build/qt5_namespaced/qtbase/include/QtCore/../../../../../qt5/qtbase/src/corelib/kernel/qmetatype.h, line 1235
This is due to normalizedTypeName passed to qRegisterNormalizedMetaType() (in QMetaTypeIdQObject<T*, QMetaType::PointerToQObject>::qt_metatype_id()) being unequal to what QMetaObject::normalizedType(normalizedTypeName.constData()).
This happens due to QMetaObject::normalizedType() skipping Qt namespace when it's specified, while normalizedTypeName still uses the Qt namespace.
Attachments
Issue Links
- relates to
-
QTBUG-105538 qmltc evolution collection task
- Open
For Gerrit Dashboard: QTBUG-99198 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
393148,7 | Restructure QML module of qmltc tests | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
393671,2 | Restructure QML module of qmltc tests | 6.3 | qt/qtdeclarative | Status: MERGED | +2 | 0 |