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

QtCreator QML formatting vs. qmlformat.exe

    XMLWordPrintable

Details

    • Windows

    Description

      Goal

      Achieve the same QML formatting result with both QtCreator and qmlformat.exe

      Technical hints

      QtCreator formats QML files when save. In order to check everybody in a team has that option enabled or, when using another IDE they have a equivalent plugin install that produces the same result, we are trying to use qmlformat.exe tool to run in the CI in order to check all QML files are correctly formatted.

      Apparently QtCreator and qmlformat.exe gives different results (i.e. semicolon is added at the end of Javascript function lines, imports are put together, etc.) making the task we are trying to do, not possible.

      The suggestion

      Provide a way to achieve the same result with QtCreator than with qmlformat.exe.

      Ideas

      • Add the missing options to qmlformat.exe in order to have the same results as QtCreator does.
      • Add the missing options to QtCreator in order to have the same results as qmlformat.exe
      • QtCreator to use qmlformat.exe tool directly in order to format the QML files

      Attachments

        Issue Links

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

          Activity

            People

              qtqmlteam Qt Qml Team User
              ialvarez Icaro Alvarez
              Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes