Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-583

States and Transitions are not auto indented correctly

XMLWordPrintable

    • 6a12c99bd1ba2b3347adb0d5d322e920ee26828f

      Currently the auto indent system will format States and Transitons as so

      states: [
      State { name: "Pressed";
          when:mouseRegion.pressed ;
          PropertyChanges { target: pressedhandle; opacity:1  }
          PropertyChanges { target: handle; opacity:0  }
      },
      State { name: "Released"
          PropertyChanges { target: handle; opacity:0  }
          
      },
      State { name: "" ; PropertyChanges { target: handlebox; x:-5 }}
      ]
      transitions: [
      Transition {
          from: "Released" ;
          NumberAnimation { matchProperties: "x"; duration: 150; easing: "easeOutCurve" }
          NumberAnimation { matchProperties: "opacity"; duration: 150; easing: "easeOutCurve" }
      },
      Transition {
          to: "Pressed" ;
          NumberAnimation { matchProperties: "opacity"; duration: 50; easing: "easeOutCurve" }
      }
      ]
      

      Instead it should be something like this

      states: [
          State { name: "Pressed";
              when:mouseRegion.pressed ;
              PropertyChanges { target: pressedhandle; opacity:1  }
              PropertyChanges { target: handle; opacity:0  }
          },
          State { name: "Released"
              PropertyChanges { target: handle; opacity:0  }
      
      },
          State { name: "" ; PropertyChanges { target: handlebox; x:-5 }}
      ]
      transitions: [
          Transition {
              from: "Released" ;
              NumberAnimation { matchProperties: "x"; duration: 150; easing: "easeOutCurve" }
              NumberAnimation { matchProperties: "opacity"; duration: 150; easing: "easeOutCurve" }
          },
          Transition {
              to: "Pressed" ;
              NumberAnimation { matchProperties: "opacity"; duration: 50; easing: "easeOutCurve" }
          }
      ]
      

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

            ckamm Christian Kamm
            designker Nigel Hietala
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes