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

Lambda functions are indented incorrectly

    Details

    • Type: Bug
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: Qt Creator 4.3.1
    • Fix Version/s: None
    • Component/s: C/C++/Obj-C++ Support
    • Labels:
      None

      Description

      Consider the following lambda function:

          hello([]() -> void {
              cout << "world";
          });

      When I use Ctrl+I, this is incorrectly indented as follows:

      hello([]() -> void {
                    cout << "world";
                });
      

      But I would prefer it to be indented as it was.

       

      NOTE: the shorter lambda syntax (without the arrow) is indented correctly:

          hello([] {
              cout << "world";
          });
      

       

        Attachments

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

          Activity

            People

            • Assignee:
              kosjar Nikolai Kosjar
              Reporter:
              timur.kristof Timur Kristóf
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes