Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
Qt Creator 17.0.0
-
None
Description
As QTCREATORBUG-26602 is being resolved, we need to test the behavior of selected codestyle in the QtQuick preferences menu.
1. Open Preferences/QtQuick/Code Style
2. Select Built-in Formatter
3. Change Default Tab Policy as Tabs Only
4. Change Default Indent Size as 8
TC1. Observe the preview on the right hand side uses tabs and indent size 8.
5. Go to Preferences/QtQuick/QmlJs Editing
6. Enable "Auto format on Save" in the Formatting group
7. Close preferences and open a qml file.
8. Right click and from the context menu choose "Reformat Document"
TC2. qmlfile should be formatted with tabs and indent size 8.
7. Edit qmlfile by adding empty lines.
8. Save the file with Ctrl + S
TC3. qmlfile should be formatted with tabs and indent size 8.
9. Edit the file again, play with its indentations.
10. Select a range in the document
11. Right click and from the context menu choose "Auto Indent Selection"
TC4. qmlfile should be indented with tabs and indent size 8.
12. Go to Preferences/QtQuick/Code Style
13. Choose QmlFormat as the formatter
14. Edit global qmlformat configuration text edit as
[General] FunctionsSpacing=false IndentWidth=4 MaxColumnWidth=-1 MaxIndent=-1 NewlineType=native NormalizeOrder=false ObjectsSpacing=false SortImports=false TernaryOnSeparateLines=false UseTabs=false
TC5. preview on the rhs should be indented with spaces and indent size 4.
15. Close preferences and open a qml file.
16. Right click and from the context menu choose "Reformat Document"
TC6. qmlfile should be formatted with spaces and indent size 4.
7. Edit qmlfile by adding empty lines.
8. Save the file with Ctrl + S
TC7. qmlfile should be formatted with spaces and indent size 4.