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

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: