Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
6.6.0 Beta1
-
None
Description
The issue can be reproduced with this patch: https://codereview.qt-project.org/c/qt/qtcoap/+/485107, which is an update of the Quick CoAP Multicast Discovery example (so if it's merged - just check the example).
Switching to the modern type registration, I use
namespace QCoapForeignNamespace
{
Q_NAMESPACE
QML_FOREIGN_NAMESPACE(QtCoap)
QML_NAMED_ELEMENT(QtCoap)
}
to register the QtCoap namespace in QML.
This works fine with CMake, but qmake generates an incorrect *_qmltyperegistrations.cpp file. Specifically, it just tried to call
QMetaType::fromType<QtCoap>().id();
to register the namespace, which makes no sense.
Note: I'm using a developer build of Qt. The problem goes away if I use an installed version of Qt (tried with the 6.6.0 snapshot from the maintenance tool).