forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/10.0'
Change-Id: I8b36c1812b61dbe08fe3e7930f950e6b8e8a7079
This commit is contained in:
@@ -203,4 +203,10 @@ void ClangFormatGlobalConfigWidget::apply()
|
||||
settings.write();
|
||||
}
|
||||
|
||||
void ClangFormatGlobalConfigWidget::finish()
|
||||
{
|
||||
m_codeStyle->currentPreferences()->setTemporarilyReadOnly(
|
||||
!ClangFormatSettings::instance().overrideDefaultFile());
|
||||
}
|
||||
|
||||
} // namespace ClangFormat
|
||||
|
||||
@@ -28,6 +28,7 @@ public:
|
||||
QWidget *parent = nullptr);
|
||||
~ClangFormatGlobalConfigWidget() override;
|
||||
void apply() override;
|
||||
void finish() override;
|
||||
|
||||
private:
|
||||
void initCheckBoxes();
|
||||
|
||||
@@ -215,9 +215,10 @@ bool getCurrentOverriddenSettings(const Utils::FilePath &filePath)
|
||||
const ProjectExplorer::Project *project = ProjectExplorer::ProjectManager::projectForFile(
|
||||
filePath);
|
||||
|
||||
return getProjectUseGlobalSettings(project)
|
||||
? ClangFormatSettings::instance().overrideDefaultFile()
|
||||
: getProjectOverriddenSettings(project);
|
||||
return getProjectUseGlobalSettings(project) ? !TextEditor::TextEditorSettings::codeStyle("Cpp")
|
||||
->currentPreferences()
|
||||
->isTemporarilyReadOnly()
|
||||
: getProjectOverriddenSettings(project);
|
||||
}
|
||||
|
||||
ClangFormatSettings::Mode getProjectIndentationOrFormattingSettings(
|
||||
|
||||
Reference in New Issue
Block a user