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

QML Reformat - Comment after imports

XMLWordPrintable

      Try to reformat (Tools->QML/JS->Reformat File) the following test file:

      import QtQuick 2.5
      // Test
      Item {
      }
      

       The result is normal:

      import QtQuick 2.5
      
      // Test
      Item {
      }
      

      But if you try to reformat again, the result will be:

      import QtQuick 2.5
      
      
      // Test
      Item {
      }
      

      Per se the presence of two line breaks is not really serious.

      But it is maybe a little bit more disturbing to have two different results after reformatting two times the same file.

      Note: the same behavior is observed with all the types of comments (// /* /*!) after a block of imports.

        For Gerrit Dashboard: QTCREATORBUG-18332
        # Subject Branch Project Status CR V

            mabenell Marco Benelli
            julien-deramond Julien Deramond
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes