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

Automatic Formatting on File Save does not read .qmlformat.ini

    XMLWordPrintable

Details

    • Windows
    • 310ec8d6a (14.0)

    Description

      qmlformat works well if being called from command line. For example

      qmlformat.exe -i Main.qml
      

      It modifies my Main.qml in place according to the .qmlformat.ini stored in project folder.

      But it does not if used from 'Automatic Formatting on File Save' option of Qt Creator. It seems like that .qmlformat.ini is ignored.

      A sample .ini is attached. One can test that:
      1. Call qmlformat.exe from CMD, then the result .qml file has indent of 16 (instead of 4 by default).
      2. Enable Automatic Formatting on File Save in Qt Creator. Indent is still 4, as if .ini file is not used.

      My settings of Preferences is also attached.

      Attachments

        1. .qmlformat.ini
          0.1 kB
        2. image-2024-08-12-11-26-19-338.png
          image-2024-08-12-11-26-19-338.png
          18 kB
        3. Preferences.png
          Preferences.png
          12 kB

        Issue Links

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

          Activity

            People

              madwinter Marcus Tillmanns
              luqiaochen Luqiao Chen
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes