From 4d153b4f678a851e3a2f44640d46fb5aed834932 Mon Sep 17 00:00:00 2001 From: Ivan Donchevskii Date: Fri, 23 Feb 2018 11:36:18 +0100 Subject: Clang: Add combobox with tidy configuration options The old way was not flexible enough. With these options it's possible to just use your config file or set tidy command line yourself. Change-Id: I1bace40986668dee5e1b30c9d03090a3fd22e253 Reviewed-by: Marco Bubke --- src/plugins/cpptools/clangdiagnosticconfig.cpp | 32 ++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 5 deletions(-) (limited to 'src/plugins/cpptools/clangdiagnosticconfig.cpp') diff --git a/src/plugins/cpptools/clangdiagnosticconfig.cpp b/src/plugins/cpptools/clangdiagnosticconfig.cpp index c605d12800..724f4404e5 100644 --- a/src/plugins/cpptools/clangdiagnosticconfig.cpp +++ b/src/plugins/cpptools/clangdiagnosticconfig.cpp @@ -72,7 +72,9 @@ bool ClangDiagnosticConfig::operator==(const ClangDiagnosticConfig &other) const return m_id == other.m_id && m_displayName == other.m_displayName && m_clangOptions == other.m_clangOptions - && m_clangTidyChecks == other.m_clangTidyChecks + && m_clangTidyMode == other.m_clangTidyMode + && m_clangTidyChecksPrefixes == other.m_clangTidyChecksPrefixes + && m_clangTidyChecksString == other.m_clangTidyChecksString && m_clazyChecks == other.m_clazyChecks && m_isReadOnly == other.m_isReadOnly; } @@ -82,14 +84,34 @@ bool ClangDiagnosticConfig::operator!=(const ClangDiagnosticConfig &other) const return !(*this == other); } -QString ClangDiagnosticConfig::clangTidyChecks() const +ClangDiagnosticConfig::TidyMode ClangDiagnosticConfig::clangTidyMode() const { - return m_clangTidyChecks; + return m_clangTidyMode; } -void ClangDiagnosticConfig::setClangTidyChecks(const QString &checks) +void ClangDiagnosticConfig::setClangTidyMode(TidyMode mode) { - m_clangTidyChecks = checks; + m_clangTidyMode = mode; +} + +QString ClangDiagnosticConfig::clangTidyChecksPrefixes() const +{ + return m_clangTidyChecksPrefixes; +} + +void ClangDiagnosticConfig::setClangTidyChecksPrefixes(const QString &checks) +{ + m_clangTidyChecksPrefixes = checks; +} + +QString ClangDiagnosticConfig::clangTidyChecksString() const +{ + return m_clangTidyChecksString; +} + +void ClangDiagnosticConfig::setClangTidyChecksString(const QString &checks) +{ + m_clangTidyChecksString = checks; } QString ClangDiagnosticConfig::clazyChecks() const -- cgit v1.2.1