Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-71573

Issue when passing enum types as arguments declared in different class

    XMLWordPrintable

Details

    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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              ulherman Ulf Hermann
              shmittal Shveta Mittal
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes