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

Regression: Editor adds second closing brace to class, creating syntax error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • Qt Creator 3.1.0-beta
    • Windows 7 64 bit
      ClangCodeModel disabled (default)

    Description

      1. Have a minimal class in your code:
        class C {
        };
        
      2. Place the cursor behind the opening brace and press Enter key.
        class C {
        
        };
        
      3. Select all characters from the current cursor position up to, but not including, the opening brace.
      4. Press backspace.
        class C {
        };
        
      5. Press Enter.
        Creator will add another closing brace and a semicolon, making the code syntactically wrong:
        class C {
            
        };
        };
        

      Code completion should not introduce syntax errors. In this case, just a new line should be added.

      This is a regression, it used to work correctly in Creator 3.0

      Attachments

        Issue Links

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

          Activity

            People

              kosjar Nikolai Kosjar
              rlohning Robert Löhning
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes