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

Wrong code indentation when functions define value types

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • Qt Creator 8.0.1, Qt Creator 9.0.0
    • Quick / QML Support
    • None
    • Linux/X11

    Description

      When you have functions that define types / return types in order to avoid qmllint complaining about qualified access like one of those in a qml file,

          function returnSomething(value: real): real {
              return value;
          }
      

       
      indentation following each of these functions is one level too deep.

      This applies to the auto indentation when pressing enter after the curly bracket, but also does when reformatting using CTRL + I

      Attachments

        1. after-ctrl-i.PNG
          after-ctrl-i.PNG
          76 kB
        2. before-ctrl-i.PNG
          before-ctrl-i.PNG
          80 kB
        3. creator-about.PNG
          creator-about.PNG
          69 kB

        Activity

          People

            qtqmlteam Qt Qml Team User
            denishessberger Denis Hessberger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: