CppCheck: Rework settings handling

Change-Id: Id9c9b316c5e0d39bc5fcba14951664e72d947a71
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
hjk
2023-05-15 18:00:42 +02:00
parent 77c19ae213
commit 824de3046c
8 changed files with 174 additions and 333 deletions

View File

@@ -31,10 +31,10 @@ class CppcheckTool final : public QObject
Q_OBJECT
public:
CppcheckTool(CppcheckDiagnosticManager &manager, const Utils::Id &progressId);
CppcheckTool(CppcheckOptions &options, CppcheckDiagnosticManager &manager, const Utils::Id &progressId);
~CppcheckTool() override;
void updateOptions(const CppcheckOptions &options);
void updateOptions();
void setProject(ProjectExplorer::Project *project);
void check(const Utils::FilePaths &files);
void stop(const Utils::FilePaths &files);
@@ -44,15 +44,13 @@ public:
void parseErrorLine(const QString &line);
void finishParsing();
const CppcheckOptions &options() const;
private:
void updateArguments();
void addToQueue(const Utils::FilePaths &files, const CppEditor::ProjectPart &part);
QStringList additionalArguments(const CppEditor::ProjectPart &part) const;
CppcheckOptions &m_options;
CppcheckDiagnosticManager &m_manager;
CppcheckOptions m_options;
QPointer<ProjectExplorer::Project> m_project;
std::unique_ptr<CppcheckRunner> m_runner;
std::unique_ptr<QFutureInterface<void>> m_progress;