Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.12.0 Alpha
Description
There is a defect when enum type defined in different class is passed as a argument.
It only takes enum types into account that were declared as part of the same meta object for which the parameter types are resolved. But if we pass enum types declared in other places, it is not working as expected.
I have a sample attached, Problem is at main.qml:
var _opt1_ = MyEnum.Option1A | MyEnum.Option1D // 0x09 _mydata_.opt1 = _opt1_; // calling mydata.setOpt1() and working fine and output QFlags<MyEnum::Option1Flag>(Option1AD) _mydata_.setOpt1(_opt1_); // calling mydata.setOpt1() and not working and output QFlags<MyEnum::Option1Flag>() _mydata_.setOption1(1, _opt1_); // similar problem with not passing class QFlags<enum MyEnum::Option1Flag> as argument properly
Attachments
Issue Links
- duplicates
-
QTBUG-58454 Q_ENUMs from one class cannot be used as a Q_INVOKABLE function parameter of another class
- Closed