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

ClangFormat formats although only copy is intended (Ctrl+Alt+DownArrow)

    XMLWordPrintable

Details

    • e9d0083ccd80c1edd09fb1dd5e97d48585b5507f (qt-creator/qt-creator/4.8)

    Description

      1. Open e.g. codecompletionsextractor-test.cpp
      2. Put the cursor on the line that declares/defines the member "Document briefCommentDocument"
      3. Hit Ctrl+Alt+DownArrow to get a copy of that line in the next line
        ==> The copy is formatted and thus takes up 5 lines, instead of 1 as above:
          Document briefCommentDocument{Utf8StringLiteral(TESTDATA_DIR"/complete_extractor_brief_comment.cpp"), compilationArguments, {},  documents};
          Document briefCommentDocument{
              Utf8StringLiteral(TESTDATA_DIR "/complete_extractor_brief_comment.cpp"),
              compilationArguments,
              {},
              documents};

      I think that when using this functionality, no formatting is intended, only indentation if at all.

      Attachments

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

        Activity

          People

            yvvan Ivan Donchevskii
            kosjar Nikolai Kosjar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes