Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.5.0 Beta3
-
None
-
-
a60968283 (dev), 2acf4db15 (6.5)
Description
In my app I have
class Foo : public QObject { Q_OBJECT QML_ANONYMOUS QML_UNCREATABLE("") }
which compiles fine with Qt 6.2.4 up to 6.4.2
With 6.5.0beta3 however, I get this (output from XCode 14, ios-sim):
/Users/sandman/Qt/6.5.0/ios/include/QtQmlIntegration/qqmlintegration.h:56:16: note: expanded from macro 'QML_UNCREATABLE' enum class QmlIsUncreatable {yes = true}; \ ^ In file included from /Users/sandman/git/brickstore/src/common/script.cpp:9: /Users/sandman/git/brickstore/src/common/brickstore_wrapper.h:468:5: note: previous definition is here QML_ANONYMOUS ^
As both macros try to create QmlIsUncreatable.
Also the docs for QML_UNCREATABLE (both 6.4 and 6.5) state:
"Some QML types are implicitly uncreatable, in particular types exposed with QML_ANONYMOUS or namespaces exposed with QML_ELEMENT or QML_NAMED_ELEMENT(). For such types, QML_UNCREATABLE() can be used to provide a custom error message."
Which IMHO implies that both can be used at the same time perfectly fine.