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

Incorrectly indents pasted code when preceded by existing try/catch blocks

    XMLWordPrintable

Details

    Description

      When pasting a piece of C++ into the editor, the resulting paste is incorrectly indented if the current file already contains code using some uses of try/catch blocks.

      When it occurs varies, but the following case seems to cause it each time:

      • Create a file with the content:
        struct X
        {
            void fn()
            try
            {
            }
            catch (...)
            {
            }
        
            void fn2()
            try
            {
            }
            catch (...)
            {
            }
        
            int x;
        };
        
        
      • Then paste some valid code after the above.

      The two try/catch blocks AND the member variable seem to be required.

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            chardrazle Richard Hazlewood
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes