Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.0.0
-
None
-
b1b843dcf5165f5b204adbd3cf36c0c8fa3605c0 in qtbase, 836c6279ebbb43e09d7754f3f43bfa29f9613315 in qtdeclarative
Description
If you have enum such as
enum Fruits {
Apple = 1<<0,
Orange = 1<<1,
Grape = 1<<2,
Kiwi = 1<<3,
AllFruits = 0xffffffff
};
and expose it to QML, all other enums are accessible in QML code, but AllFruits returns undefined. It would be expected that it would instead return the numeric value of AllFruits.
Also, if you replace 0xffffffff with -1, the problem still persists. If you make the flag value smaller, however, like 0x00ffffff, it works in QML.