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
    • P3: Somewhat important
    • None
    • Qt Creator 8.0.1, Qt Creator 9.0.0, Qt Creator 10.0.0, Qt Creator 11.0.0, Qt Creator 12.0.0
    • Quick / QML Support
    • 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
          76 kB
          Denis Hessberger
        2. before-ctrl-i.PNG
          80 kB
          Denis Hessberger
        3. creator-about.PNG
          69 kB
          Denis Hessberger
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

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

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes