Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
6.10
-
None
Description
Consider a header like
#pragma once#include "cppLibrary_global.h" #include <QObject> #include <QtQml/qqmlregistration.h> namespace a::b { Q_NAMESPACE_EXPORT(CPPLIBRARY_EXPORT) QML_NAMED_ELEMENT(mylib) enum class MyEnum : quint8 { Val1, Val2, Val3 }; Q_ENUM_NS(MyEnum) } // end a::b
The only thing a header can expose to QML are enums; however, you can't access enums on a lower case name (mylib.MyEnum.Val1 won't work).
Therefore, this should trigger a build time warning.
Attachments
Issue Links
- resulted from
-
QTBUG-123344 QML_FOREIGN_NAMESPACE not working for namespace located outside of binary
-
- Closed
-