diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-01-03 13:30:19 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-01-03 13:59:55 +0000 |
commit | 29c7a1d566f9bbdcf3cadc270f4481e05a71eefb (patch) | |
tree | e7d39cdb08333416879eadf28e6f5c47e966260f /tests/auto/qml/qqmlpropertycache/data | |
parent | dca7fc3e3a0fe428ed97762a44c15e83607e6d28 (diff) |
QQmlPropertyCache: Add test that reads and writes short enums
This is to guard against any problems from casting those to int and
back.
Change-Id: I740a5250158ce47195ab04d42d967ff9c82bf9bd
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlpropertycache/data')
-rw-r--r-- | tests/auto/qml/qqmlpropertycache/data/foreignEnums.qml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlpropertycache/data/foreignEnums.qml b/tests/auto/qml/qqmlpropertycache/data/foreignEnums.qml index 7ceb231c8d..b7492e507e 100644 --- a/tests/auto/qml/qqmlpropertycache/data/foreignEnums.qml +++ b/tests/auto/qml/qqmlpropertycache/data/foreignEnums.qml @@ -7,5 +7,11 @@ QtObject { mydata.opt1 = opt1; mydata.setOpt1(opt1); mydata.setOption1(opt1); + + var opt2 = mydata.opt2; + opt2 = (opt2 === MyEnum.Short8 ? MyEnum.Short16 : MyEnum.Short0); + mydata.opt2 = opt2; + mydata.setOpt2(opt2); + mydata.setOption2(opt2); } } |