forked from qt-creator/qt-creator
ClangFormat: Add the logical settings management
Now there are changeable and unchangeable settings, as it works for usual codestyle settings. They save parallel with codestyle settings but in another dir. In general, the behavior became similar to usual codestyle settings. ToDo: Make indenter use this settings instead standard one and instead project settings when "override" checkbox is checked. Change-Id: I639dbda296932bf9b967a11f1cc4fda120415ed9 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -84,11 +84,13 @@ public:
|
||||
return new ClangFormatIndenter(doc);
|
||||
}
|
||||
|
||||
std::pair<CppEditor::CppCodeStyleWidget *, QString> additionalTab(QWidget *parent) const override
|
||||
std::pair<CppEditor::CppCodeStyleWidget *, QString> additionalTab(
|
||||
TextEditor::ICodeStylePreferences *codeStyle, QWidget *parent) const override
|
||||
{
|
||||
if (!parent)
|
||||
return {new ClangFormatConfigWidget(), tr("ClangFormat")};
|
||||
return {new ClangFormatConfigWidget(SessionManager::startupProject()), tr("ClangFormat")};
|
||||
return {new ClangFormatConfigWidget(codeStyle), tr("ClangFormat")};
|
||||
return {new ClangFormatConfigWidget(codeStyle, SessionManager::startupProject()),
|
||||
tr("ClangFormat")};
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user