forked from qt-creator/qt-creator
Clang: Use the tree instead of the list for Clang-Tidy settings
List of checks does not give enough flexibility to select/unselect specific checks. The tree fixes that. Also remove Clang-Tidy checks line edit because it is now integrated into the tree mode as an alternative way of providing checks by pressing "Plain text edit" button. 'cpptools_clangtidychecks.h' is generated using python script 'generateClangTidyChecks.py' and clang-tidy from our LLVM/Clang 6.0 build. Change-Id: I2ed1738cb2cbbf8dac6aba563469f06f69b11593 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This commit is contained in:
@@ -50,6 +50,8 @@ class ClazyChecks;
|
||||
class TidyChecks;
|
||||
}
|
||||
|
||||
class TidyChecksTreeModel;
|
||||
|
||||
class CPPTOOLS_EXPORT ClangDiagnosticConfigsWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -70,8 +72,7 @@ private:
|
||||
void onCopyButtonClicked();
|
||||
void onRemoveButtonClicked();
|
||||
void onClangTidyModeChanged(int index);
|
||||
void onClangTidyItemChanged(QListWidgetItem *item);
|
||||
void onClangTidyLineEdited(const QString &text);
|
||||
void onClangTidyTreeChanged();
|
||||
void onClazyRadioButtonChanged(bool checked);
|
||||
|
||||
void onDiagnosticOptionsEdited();
|
||||
@@ -81,7 +82,7 @@ private:
|
||||
void syncOtherWidgetsToComboBox();
|
||||
void syncClangTidyWidgets(const ClangDiagnosticConfig &config);
|
||||
void syncClazyWidgets(const ClangDiagnosticConfig &config);
|
||||
void syncTidyChecksList(const ClangDiagnosticConfig &config);
|
||||
void syncTidyChecksToTree(const ClangDiagnosticConfig &config);
|
||||
|
||||
void updateConfig(const CppTools::ClangDiagnosticConfig &config);
|
||||
|
||||
@@ -115,6 +116,7 @@ private:
|
||||
|
||||
std::unique_ptr<CppTools::Ui::TidyChecks> m_tidyChecks;
|
||||
QWidget *m_tidyChecksWidget = nullptr;
|
||||
std::unique_ptr<TidyChecksTreeModel> m_tidyTreeModel;
|
||||
|
||||
int m_selectedConfigIndex = 0;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user