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

The QML auto format function adds additional line breaks before comments.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • Qt Creator 4.8.0, Qt Creator 4.9.0-rc1, Qt Creator 4.10.0-beta1
    • Quick / QML Support
    • None
    • All

    Description

      The QML auto format function adds additional line breaks before comments.

       

      /**
       * Copyright (C) test header
       */
      import QtQuick 2.4
      
      Rectangle 
      {
          id: testRect
      
          /**
           * Test function
           */
          function testFunction() {
              return 123
          }
      }
      

       

      after QML auto format (see header and function)

      
      /**
       * Copyright (C) test header
       */
      import QtQuick 2.4
      
      Rectangle {
          id: testRect
      
      
          /**
           * Test function
           */
          function testFunction() {
              return 123
          }
      }

       

      Qt Creator version 4.7.0 formats this code correctly.

      Attachments

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

        Activity

          People

            qtqmlteam Qt Qml Team User
            michael-doennebrink Michael Dönnebrink
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes