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

Indentation become crazy in lambda functions.

XMLWordPrintable

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

      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;
      }
      

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes