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

[REG 4.3 -> 4.4] Closing bracket is added automatically after if/for/while

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • Qt Creator 4.4.0, Qt Creator 4.4.1, Qt Creator 4.5.0-beta1
    • None

    Description

      Write a condition:

      if (something) {
      

      And QtCreator automatically adds the closing bracket:

      if (something) {}
      

      which is sometimes inconvenient, e.g. when you want to add a condition for existing block of code.

      You have a code:

      firstFunction();
      secondFunction();
      

      And then after adding a new condition:

      if (something) {}
      firstFunction();
      secondFunction();
      

      you must remove the closing bracket manually every time before adding an indentation and closing bracket to the end of code block.

      This won't happen in QtCreator older than 4.4. This issue also doesn't happen when opening bracket is added without a condition or loop keyword.

      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
              zaps166 Błażej Szczygieł
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes