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

Curly braces autocomplete after else

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • Qt Creator 4.8.0
    • C/C++/Obj-C++ Support
    • None
    • Windows 10 64bit
    • Windows

    Description

      My code generally follows the style of having curly braces on the line following the if-else statements, rather than on the same line (yes, I know it's old-fashioned, but I'm not about to refactor my entire project).

      I just updated Qt Creator from 4.7.1 to 4.8.0 and noticed that when I type in "else" an autocomplete comes up that, if I hit Enter, tries to be helpful and add curly braces one space after the else and two lines down. Unfortunately, this actually creates work for me since I now have to escape out of the autocomplete to put the starting curly brace where I want it.

      What happens:

      What I want:

      Can you add a way to control this such that autocomplete will honor my code style? I would expect a setting like this on the Braces tab:

      Attachments

        1. image-2018-12-28-10-21-30-752.png
          6 kB
          Evon Silvia
        2. image-2018-12-28-10-21-45-825.png
          39 kB
          Evon Silvia
        3. image-2018-12-28-10-22-03-029.png
          3 kB
          Evon Silvia

        Issue Links

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

          Activity

            People

              kosjar Nikolai Kosjar
              phlucious Evon Silvia
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes