Details
-
Suggestion
-
Resolution: Moved
-
P2: Important
-
None
-
Qt Creator 8.0.1
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
- depends on
-
QTCREATORBUG-26602 Integration of "qmlformat" in QtCreator
- Open
- resulted in
-
QTBUG-119967 qmlformat: reach feature parity with QtC built-in formatter
- Reported
For Gerrit Dashboard: QTCREATORBUG-28192 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
441820,14 | Optionally use qmlformat for Qt Quick auto format on save | master | qt-creator/qt-creator | Status: MERGED | +2 | 0 |