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

Auto-indent with lambda as function argument

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • Qt Creator 10.0.0-beta1
    • Qt Creator 3.6.0, Qt Creator 4.3.0-beta1
    • C/C++/Obj-C++ Support
    • None
    • Qt5.5.1 QtCreator 3.6.0 Ubuntu 14.04 64bit

    Description

      Here is the problem:

      After auto-indentation, I got this:

      void function(MovieMetadata* movieMetadata)
      {
          auto future =  QtConcurrent::map(movieMetadataList, [&](MovieMetadata* movieMetadata){
               this->addMovieMetadata_p(movieMetadata);
      });
      }
      

      As you can see, it doesn't look good, the }); should be at least 4 spaces to be in same level with auto. But the best is to be as the following :

      void function(MovieMetadata* movieMetadata)
      {
          auto future = QtConcurrent::map(movieMetadataList, [&](MovieMetadata* movieMetadata){
                            this->addMovieMetadata_p(movieMetadata);
                        });
      }
      

      Attachments

        Activity

          People

            kandeler Christian Kandeler
            theshadowx Ali Diouri
            Votes:
            8 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: