Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-105478

qmlformat: Strange reordering of sections

    XMLWordPrintable

Details

    • dc5d14c3963e25a3664ed116856e7f604e43b7af

    Description

      Input file

      /*
          Copyright (C) 2022 Acme Inc.
      */
      pragma Singleton
      import QtQml 2.15
      
      /*!
          \qmltype FormatterDemo
          \inqmlmodule MyModule
          \brief Demonstrate an issue with qmlformat 5.15
      */
      QtObject {
          id: myObject
      }
      // TODO: Add foo
      

       

      Outcomes

      • Qt 6.3.1: qmlformat does not change anything (correct)
      • Qt 5.15.10: qmlformat rearranges sections in strange ways (wrong, especially with putting the copyright header between the import and the pragma): 
      // TODO: Add foo
      
      import QtQml 2.15
      /*
          Copyright (C) 2022 Acme Inc.
      */
      pragma Singleton
      
      /*!
          \qmltype FormatterDemo
          \inqmlmodule MyModule
          \brief Provide a small demo of issuer with qmlformat 5.
      */
      QtObject {
          id: myObject
      }
      

      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
            skoh-qt Sze Howe Koh
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes