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

indentation of switch/case blocks is still wrong

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • Qt Creator 2.3.0
    • Qt Creator 2.0.1
    • C/C++/Obj-C++ Support
    • None
    • Linux
    • 779fafcbfe6f92dd1288664fae512f69bc12418b

      switch statements are not auto-indented correctly for the "Exclude Braces" style:

      switch(x)
      {
      case 1:
        break;
      case 2:
        break;
      }
      

      This is clearly wrong; everything between the braces should be indented one level.

      It should be like this:

      switch(x)
      {
        case 1:
          break;
        case 2:
          break;
      }
      

      And for the "Include Braces" style, it's also wrong; in this case the statements in a case block are not indented from the case label itself:

      switch(x)
        {
        case 1:
        break;  
        case 2:
        break;
        }
      

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

            ckamm Christian Kamm
            mesmerism Mark Lindner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes