Details
-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
Qt Creator 10.0.2, Qt Creator 11.0.0-beta1
-
None
-
6a20e588b (11.0)
Description
I have a C++ Style configuration that uses Tabs for indentation.
When .clang-format file is created for this configuration, it is created with UseTab: Never, and the lines are indented with spaces.
To reproduce:
qtcreator -settingspath /tmp/no-tabs -noload ClangFormat
Edit -> Preferences -> C++ -> Code Style
Copy Qt, change the Tab policy to Tabs Only, Apply and quit Qt Creator
Now run again with:
qtcreator -settingspath /tmp/no-tabs
Edit -> Preferences -> C++ -> Code Style
Notice that the preview appears with spaces, and if you scroll to the bottom (it's the last setting) you'll see UseTab: Never.
Now switch to General. The combobox shows Spaces Only, but the preview has tabs .
If you manually change it to Tabs Only, the issue is fixed.
Attachments
For Gerrit Dashboard: QTCREATORBUG-29185 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
482950,10 | ClangFormat: Use pre-existing code style settings | 11.0 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |
484130,1 | ClangFormat: Use pre-existing code style settings | master | qt-creator/qt-creator | Status: ABANDONED | 0 | 0 |