misc: format QML files using the python format script

+ Requires that the Qt path is supplied when calling build.py --init.
+ format.py now also takes a --qt argument to specify the Qt path, used to locate qmlformat.
+ format.py takes a --type argument to specify the type of files to format (qml, cpp, or both).

qmlformat is called with `--normalize` and `--force`.

Gitlab: #1059
Change-Id: Id9ff4b17018370696792b44f55ed2f4bc8091193
This commit is contained in:
Andreas Traczyk
2023-04-05 13:34:31 -04:00
parent a8f48df4f9
commit ae1cde4dc1
4 changed files with 104 additions and 30 deletions

View File

@@ -63,7 +63,7 @@ for getting the latest development versions; otherwise, you can use
submodule).
```bash
./build.py --init
./build.py --init [--qt=<path/to/qt> (this is required for qmlformatting to work)]
```
Then you will need to install dependencies: