forked from qt-creator/qt-creator
Clangformat: Brings back some of checkboxes
Brought back checkboxes: format while typing, format on save. Brought back format while typing feature. Global checkboxes will be hidden in project settings, and visible for global. Change-Id: I193cf9e13b10de22091edb5fe04aef957dd74586 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -114,7 +114,13 @@ int ClangFormatIndenter::lastSaveRevision() const
|
||||
|
||||
bool ClangFormatIndenter::formatOnSave() const
|
||||
{
|
||||
return !isBeautifierOnSaveActivated() && formatCodeInsteadOfIndent();
|
||||
return ClangFormatSettings::instance().formatOnSave() && !isBeautifierOnSaveActivated()
|
||||
&& formatCodeInsteadOfIndent();
|
||||
}
|
||||
|
||||
bool ClangFormatIndenter::formatWhileTyping() const
|
||||
{
|
||||
return ClangFormatSettings::instance().formatWhileTyping() && formatCodeInsteadOfIndent();
|
||||
}
|
||||
|
||||
} // namespace ClangFormat
|
||||
|
||||
Reference in New Issue
Block a user