Extract AnalyzeUnit out of ClangStaticAnalyzerRunControl

Reduces some noise in the implementation file.

Change-Id: I24e81941c1888ba69f6b7f8dcab35956f60ca4e6
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
Nikolai Kosjar
2015-04-16 13:16:09 +02:00
parent fce0b85106
commit ef79615fe5
2 changed files with 20 additions and 23 deletions

View File

@@ -31,19 +31,19 @@ namespace Internal {
class ClangStaticAnalyzerRunner;
class Diagnostic;
struct AnalyzeUnit {
AnalyzeUnit(const QString &file, const QStringList &options)
: file(file), arguments(options) {}
QString file;
QStringList arguments; // without file itself and "-o somePath"
};
typedef QList<AnalyzeUnit> AnalyzeUnits;
class ClangStaticAnalyzerRunControl : public Analyzer::AnalyzerRunControl
{
Q_OBJECT
public:
struct AnalyzeUnit {
AnalyzeUnit(const QString &file, const QStringList &options)
: file(file), arguments(options) {}
QString file;
QStringList arguments; // without file itself and "-o somePath"
};
public:
explicit ClangStaticAnalyzerRunControl(const Analyzer::AnalyzerStartParameters &startParams,
ProjectExplorer::RunConfiguration *runConfiguration,
@@ -56,7 +56,7 @@ signals:
void newDiagnosticsAvailable(const QList<Diagnostic> &diagnostics);
private:
QList<ClangStaticAnalyzerRunControl::AnalyzeUnit> unitsToAnalyze();
AnalyzeUnits unitsToAnalyze();
void analyzeNextFile();
ClangStaticAnalyzerRunner *createRunner();
@@ -75,7 +75,7 @@ private:
QString m_clangExecutable;
QString m_clangLogFileDir;
QFutureInterface<void> m_progress;
QList<AnalyzeUnit> m_unitsToProcess;
AnalyzeUnits m_unitsToProcess;
QSet<ClangStaticAnalyzerRunner *> m_runners;
int m_initialFilesToProcessSize;
int m_filesAnalyzed;