forked from qt-creator/qt-creator
ClangFormat: Make formatting mode a project option
- Added the possibility to set formatting mode for every project separately. The indenter will be switched for a file if the mode changes. Fixes: QTCREATORBUG-28188 Change-Id: I4e7f9841c54f9b6763586c16672a10ca36bf843d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
committed by
Christian Kandeler
parent
192605f01c
commit
feb72dd084
@@ -62,9 +62,7 @@ class ClangFormatStyleFactory : public CppEditor::CppCodeStylePreferencesFactory
|
||||
public:
|
||||
TextEditor::Indenter *createIndenter(QTextDocument *doc) const override
|
||||
{
|
||||
if (ClangFormatSettings::instance().mode() == ClangFormatSettings::Disable)
|
||||
return CppEditor::CppCodeStylePreferencesFactory::createIndenter(doc);
|
||||
return new ClangFormatIndenter(doc);
|
||||
return new ClangFormatForwardingIndenter(doc);
|
||||
}
|
||||
|
||||
std::pair<CppEditor::CppCodeStyleWidget *, QString> additionalTab(
|
||||
|
||||
Reference in New Issue
Block a user