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

Indentation become crazy in lambda functions.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: Qt Creator 4.0.2
    • Fix Version/s: None
    • Component/s: C/C++/Obj-C++ Support
    • Labels:
      None

      Description

      Qt Creator indentation become crazy in some situations.

      https://youtu.be/TXebKGTp-64

      Here a minimal example:

      #include <QWidget>
      #include <functional>
      class test
      {
      	int setFunc(std::function<void(Qt::FocusReason)> b){return 1;}
      
      	void func()
      	{
      		int any = setFunc([this](Qt::FocusReason reason)
      		{
      			if(true) // insert here \n { \n }
      		});
      	}
      };
      
      
      int main(int n, char **args)
      {
      	return 0;
      }
      

        Attachments

          Issue Links

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

            Activity

              People

              • Assignee:
                kosjar Nikolai Kosjar
                Reporter:
                Escain Adrian
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes