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

Auto Indent does not handle exception handling blocks correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3: Somewhat important P3: Somewhat important
    • Qt Creator 10.0.0-beta1
    • Qt Creator 3.1.1, Qt Creator 3.2.0-beta1, Qt Creator 3.3.0-beta1
    • C/C++/Obj-C++ Support
    • None
    • Windows 7

      Braces and lines of the try/catch/... statements are incorrectly indented when settings are as follows:

      • braces are supposed to be indented
      • lines within blocks are supposed not to be indented

      required behaviour which works:

      if ( something )
        {
        do_something();
        }
      

      required behaviour which does not work:

      try
        {
        do_something();
        }
      catch(...)
        {
        do_something_else();
        }
      

      for the example above braces are either left intact or opening brace is left as well as lines of code inside are left, while the closing brace is indented.

      In my opinion the setting in 'Braces' page in 'Edit Code Style' dialog do not consider blocks in try/catch/... blocks as a block for indetation.

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

            kandeler Christian Kandeler
            prismacolor prisma color
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes