ClangFormat: Add disable option

- Added a possibility to disable ClangFormat plugin
- Removed unneeded properties from clangformatsettings

Change-Id: If71f46670e4fd3d2dac6d18c97df5a811504ed5e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Artem Sokolovskii
2022-05-12 12:51:51 +02:00
parent 10dd3706fa
commit 0b6fca2293
9 changed files with 76 additions and 109 deletions

View File

@@ -37,22 +37,21 @@ public:
ClangFormatSettings();
void write() const;
void setFormatCodeInsteadOfIndent(bool enable);
bool formatCodeInsteadOfIndent() const;
void setFormatWhileTyping(bool enable);
bool formatWhileTyping() const;
void setFormatOnSave(bool enable);
bool formatOnSave() const;
void setOverrideDefaultFile(bool enable);
bool overrideDefaultFile() const;
enum Mode {
Indenting = 0,
Formatting,
Disable
};
void setMode(Mode mode);
Mode mode() const;
private:
bool m_formatCodeInsteadOfIndent = false;
bool m_formatWhileTyping = false;
bool m_formatOnSave = false;
bool m_overrideDefaultFile = false;
Mode m_mode;
};
} // namespace ClangFormat