forked from qt-creator/qt-creator
ClangTools: Add settings for build project dependency
All Clang tools get support for running project build before themselves or skipping that step. Before this change static analyzer always ran it and ClangTidy+Clazy tool always skipped. Change-Id: Idb9fbc27f0589472abb0f9d207857eb79c0079fd Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -25,29 +25,42 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
|
||||
namespace ClangTools {
|
||||
namespace Internal {
|
||||
|
||||
class ClangToolsSettings
|
||||
class ClangToolsSettings : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
static ClangToolsSettings *instance();
|
||||
|
||||
void writeSettings();
|
||||
|
||||
int savedSimultaneousProcesses() const;
|
||||
bool savedBuildBeforeAnalysis() const;
|
||||
|
||||
int simultaneousProcesses() const;
|
||||
void setSimultaneousProcesses(int processes);
|
||||
|
||||
int buildBeforeAnalysis() const;
|
||||
void setBuildBeforeAnalysis(bool build);
|
||||
|
||||
signals:
|
||||
void buildBeforeAnalysisChanged(bool checked) const;
|
||||
|
||||
private:
|
||||
ClangToolsSettings();
|
||||
void readSettings();
|
||||
|
||||
void updateSavedBuildBeforeAnalysiIfRequired();
|
||||
|
||||
int m_simultaneousProcesses = -1;
|
||||
int m_savedSimultaneousProcesses = -1;
|
||||
bool m_buildBeforeAnalysis = false;
|
||||
bool m_savedBuildBeforeAnalysis= false;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user