-
Bug
-
Resolution: Unresolved
-
P2: Important
-
6.10
-
None
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.
- resulted from
-
QTBUG-123344 QML_FOREIGN_NAMESPACE not working for namespace located outside of binary
-
- Closed
-
For Gerrit Dashboard: QTBUG-138244 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
663627,1 | Warn when QML element name starts with lowercase | dev | qt/qtdeclarative | Status: NEW | 0 | 0 |