forked from qt-creator/qt-creator
ClangFormat: Fix code style preferences are grayed out
Code style preferences are grayed out even when formatting mode is set to disable. Fixes: QTCREATORBUG-29129 Change-Id: Icf82fa0751f9291122c2af55111b6bd5fac85c7b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -213,10 +213,14 @@ bool getCurrentOverriddenSettings(const Utils::FilePath &filePath)
|
||||
const ProjectExplorer::Project *project = ProjectExplorer::SessionManager::projectForFile(
|
||||
filePath);
|
||||
|
||||
return getProjectUseGlobalSettings(project) ? !TextEditor::TextEditorSettings::codeStyle("Cpp")
|
||||
->currentPreferences()
|
||||
->isTemporarilyReadOnly()
|
||||
: getProjectOverriddenSettings(project);
|
||||
return getProjectUseGlobalSettings(project)
|
||||
? !TextEditor::TextEditorSettings::codeStyle("Cpp")
|
||||
->currentPreferences()
|
||||
->isTemporarilyReadOnly()
|
||||
&& !TextEditor::TextEditorSettings::codeStyle("Cpp")
|
||||
->currentPreferences()
|
||||
->isAdditionalTabDisabled()
|
||||
: getProjectOverriddenSettings(project);
|
||||
}
|
||||
|
||||
ClangFormatSettings::Mode getProjectIndentationOrFormattingSettings(
|
||||
|
||||
Reference in New Issue
Block a user