diff --git a/.qmlformat.ini b/.qmlformat.ini new file mode 100644 index 000000000..0313248ca --- /dev/null +++ b/.qmlformat.ini @@ -0,0 +1,26 @@ +# Copyright (c) 2010-2026 Belledonne Communications SARL. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +# The doc of the format could be find here : https://doc.qt.io/qt-6/qtqml-tooling-qmlformat.html + +[General] +UseTabs=true +IndentWidth=4 +MaxColumnWidth=120 +NormalizeOrder=false +FunctionsSpacing=false +ObjectsSpacing=false +SortImports=false +SemicolonRule=always \ No newline at end of file diff --git a/README.md b/README.md index 5ae1e7225..292ff0b58 100644 --- a/README.md +++ b/README.md @@ -351,6 +351,20 @@ Please note that we don't offer free support and these contributions will be add - external : external projects. - linphone-sdk +#### Formating + +Code is formated using `clang` for C++ and `qmlformat` for QML + +##### Configuration + +* **VSCode** +1. Install the followings extentions : [Qt Qml](https://marketplace.visualstudio.com/items?itemName=TheQtCompany.qt-qml) and [Clang-Format](https://marketplace.visualstudio.com/items?itemName=xaver.clang-format) +2. Add the following lines to your vscode settings workspace file `settings.json` +```json +"editor.formatOnSave": true, +"clang-format.executable": ".clang-format", +``` + #### Add new text/label For each text/label that you want to put in the application, you need to follow thoses steps: