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

Indentation become crazy in lambda functions.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • None
    • Qt Creator 4.0.2
    • C/C++/Obj-C++ Support

    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

              kandeler Christian Kandeler
              Escain Adrian
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes