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

switch-case indented incorrectly for gnu and include-brace styles

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • Qt Creator 2.2.0
    • Qt Creator 2.2.0
    • C/C++/Obj-C++ Support
    • None
    • RedHat4 based Linux
    • d2468a4491109dd5132b51576c326e4f657a84ce

      Hi, I have this example code in Qt Creator's editor:

      ONE(two, Top)
      {
      switch (msg->evt)
      {
      case ENTRY_EVT:
      THREE("Top");
      error = 0;
      break;
                  
      case START_EVT:
      FOUR("Top");
      error = 0;
      break;
      }
      return msg;
      }
      

      I select the whole code and choose Edit->Advanced->Auto indent selection,
      then line "case ENTRY_EVT:" is incorrectly intended (too much left):

      ONE(two, Top)
      {
          switch (msg->evt)
              {
          case ENTRY_EVT:
                  THREE("Top");
                  error = 0;
                  break;
                  
              case START_EVT:
                  FOUR("Top");
                  error = 0;
                  break;
              }
          return msg;
      }
      

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

            ckamm Christian Kamm
            teeharju Teemu S. Harju
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes