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

Incorrect indent for Clang-style lambda blocks

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P4: Low
    • None
    • Qt Creator 3.0.0-rc1
    • C/C++/Obj-C++ Support

    Description

      Steps to reproduce:

      • Reset Qt Creator settings (rm -Rf ~/.config/QtProject/qtcreator)
      • File > New File or Project... > C++ Class
      • Inside the automatically-created constructor, insert a new line and type dispatch_async(dispatch_get_main_queue(), ^{ then press return, then type something (for example return;) on the next line.

      The return; line is indented with 23 leading spaces. I would have expected it to be indented with 8 leading spaces — a first indent since it's inside the constructor, and a second indent because it's inside a Clang-style lambda block.

      See also the attached screenshots of actual and expected behavior.

      Attachments

        Activity

          People

            kandeler Christian Kandeler
            smokris Steve Mokris
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: