ClangTools: Prompt for files to analyze

If the run button is clicked, the user is prompted to select the files
for analysis.

Change-Id: I21e4ee6b7c14392a8c1a901ac7aa1c9c16e30f0d
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
Nikolai Kosjar
2018-05-02 14:51:05 +02:00
parent ef528e1801
commit 1bc605d050
22 changed files with 546 additions and 61 deletions

View File

@@ -25,6 +25,8 @@
#pragma once
#include "clangfileinfo.h"
#include <projectexplorer/runconfiguration.h>
#include <cpptools/projectinfo.h>
#include <utils/environment.h>
@@ -55,7 +57,8 @@ class ClangToolRunControl : public ProjectExplorer::RunWorker
public:
ClangToolRunControl(ProjectExplorer::RunControl *runControl,
ProjectExplorer::Target *target);
ProjectExplorer::Target *target,
const FileInfos &fileInfos);
bool success() const { return m_success; } // For testing.
@@ -73,7 +76,7 @@ private:
void start() final;
void stop() final;
AnalyzeUnits sortedUnitsToAnalyze(const QString &clangVersion);
AnalyzeUnits unitsToAnalyze(const QString &clangVersion);
void analyzeNextFile();
void handleFinished();
@@ -91,6 +94,7 @@ protected:
private:
QPointer<ProjectExplorer::Target> m_target;
FileInfos m_fileInfos;
CppTools::ProjectInfo m_projectInfoBeforeBuild;
CppTools::ProjectInfo m_projectInfo;