Uploaded image for project: 'Qt for MCUs'
  1. Qt for MCUs
  2. QTMCU-59

std::string cast error on property change

    XMLWordPrintable

Details

    • Sprint 4.4/2021, QUL Sprint 4.5/2021, QUL Sprint 2.2/2022, QUL Sprint 2.3/2022, QUL Sprint 2.4/2022, QUL Sprint 2.5/2022, QUL Sprint 2.6/2022, QUL Sprint 3.1/2022

    Description

          Test {
              onValChanged: console.log(val)
          }
      

      std::string property cannot define change signal hook.
      Tested on MSVC 2019 and GHS

      "C:\Users\arkce\Desktop\Repos\temp\build-TestProp-Qt_for_MCUs_1_9_RH850_D1M1A_BAREMETAL_32bpp_GHS-Debug\CMakeFiles\TestProp.dir\TestProp.cpp", line 50: error #289:
                no instance of constructor "Qul::Private::ChangedEvent<Functor,
                Type>::ChangedEvent [with
                Functor=TestProp::test_onValChanged_bindingFunctor,
                Type=Qul::Private::String]" matches the argument list
                  argument types are: (TestProp::test_onValChanged_bindingFunctor,
                            Qul::Property<std::string> *)
            , test_onValChanged_binding(test_onValChanged_bindingFunctor(this), &test.val)
      

      BTW, this trick passed:

          Test {
              property string valFake: val
              onValFakeChanged: console.log(val)
          }
      

      Attachments

        Issue Links

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

          Activity

            People

              pandaras Panajotis Daras
              jiu shanheng jiu
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes