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

Braces not indented properly after an IF without braces

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • Qt Creator 2.2.0
    • Qt Creator 2.1.0-beta2
    • Editors
    • None
    • Windows XP
    • 7c5d89ae8a79760312ccf4082e44ea6ced9d2d18

      I am using the 2.1 RC1. The auto-indenter misses up the first curly bracket.

      Qt Creator
      if (x == y)
          return;
              
      if (y == z)
          {  //<-- indented when it shouldn't be!
          //do something
          return;
      }
      
      Should be
      Should be:
      if (x == y)
          return;
              
      if (y == z)
      {
          //do something
          return;
      }
      

      MORE INFO: I attached the QML file that had a problem. C++ files do NOT have this problem, so I guess that's why you can't repo it.

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

            ckamm Christian Kamm
            frankli Frank Li
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes