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

Using AnchorChanges result in corrupted c++ code

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • Qt for MCUs 1.5
    • Qt for MCUs 1.4
    • QML Engine
    • None
    • All
    • 0
    • UL Sprint 3.7

    Description

      AnchorChanges do not work with QML for MCU

      Following QML code:

      Rectangle {
          id: test
          width: 480
          height: 272
      
          states: [
              State {
                  name: "Test1"
                  AnchorChanges{
                      target: test
                      anchors.horizontalCenter: parentRect.horizontalCenter
                  }
              }
          ]
      
          Rectangle{
              id: parentRect
          }
      }
      
      

      created following c++ corrupted c++ code:

      .
      .
      .
      int Test::_x_anchor_bindingFunctor::operator()(Test *self) const {
              return self->anchors.horizontalCenter.value().valueFor(&self->) - ((self->width.value())/2);
      };
      .
      .
      .
      void Test::activateState_Test1(Qul::Private::Items::Transition *transition, Qul::Private::Items::Transition::TransitionStatus _qul_transitionStatus)
      {
          if (_qul_transitionStatus == Qul::Private::Items::Transition::TransitionStart) {
              _anchors_horizontalCenter_binding_state_Test1.init<Test, &Test::_anchors_horizontalCenter_binding_state_Test1>();
          }
          // anchors.horizontalCenter: parentRect.horizontalCenter
          // line 13  "Test/Test.qml"
          if (!transition || !transition->interceptBinding(_qul_transitionStatus, &.anchors.horizontalCenter, &_anchors_horizontalCenter_binding_state_Test1)) .anchors.horizontalCenter.setBinding(&_anchors_horizontalCenter_binding_state_Test1);
          if (transition && _qul_transitionStatus == Qul::Private::Items::Transition::TransitionStart)
              transition->start(&finishActivateState_Test1);
      }

      This issue happens with all anchor types in AnchorChanges

      Attachments

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

        Activity

          People

            ckamm Christian Kamm
            _joerg_ Jörg Hedrich
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes