forked from qt-creator/qt-creator
Clang: Introduce switching/adding of warning configurations
A warning configuration is a list of command line (warning) options for libclang. Three non-editable built-in configurations are provided by default. The user can copy a configuration to customize it. This is still a global setting and it changes take effect after re-opening a document. Both issues will be addressed in follow-up changes. Change-Id: I86667d7dc39ad31b88666454220e6da563797740 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
This commit is contained in:
@@ -28,6 +28,8 @@
|
||||
|
||||
#include "cpptools_global.h"
|
||||
|
||||
#include "clangdiagnosticconfigsmodel.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QStringList>
|
||||
|
||||
@@ -52,9 +54,12 @@ public:
|
||||
void toSettings(QSettings *s);
|
||||
|
||||
public:
|
||||
static QStringList defaultExtraClangOptions();
|
||||
QStringList extraClangOptions() const;
|
||||
void setExtraClangOptions(const QStringList &extraClangOptions);
|
||||
Core::Id clangDiagnosticConfigId() const;
|
||||
void setClangDiagnosticConfigId(const Core::Id &configId);
|
||||
const ClangDiagnosticConfig clangDiagnosticConfig() const;
|
||||
|
||||
ClangDiagnosticConfigs clangCustomDiagnosticConfigs() const;
|
||||
void setClangCustomDiagnosticConfigs(const ClangDiagnosticConfigs &configs);
|
||||
|
||||
PCHUsage pchUsage() const;
|
||||
void setPCHUsage(PCHUsage pchUsage);
|
||||
@@ -64,10 +69,12 @@ public: // for tests
|
||||
|
||||
signals:
|
||||
void changed();
|
||||
void clangDiagnosticConfigIdChanged();
|
||||
|
||||
private:
|
||||
QStringList m_extraClangOptions;
|
||||
PCHUsage m_pchUsage = PchUse_None;
|
||||
ClangDiagnosticConfigs m_clangCustomDiagnosticConfigs;
|
||||
Core::Id m_clangDiagnosticConfigId;
|
||||
};
|
||||
|
||||
} // namespace CppTools
|
||||
|
||||
Reference in New Issue
Block a user