ClangToolRunner: Add done(const AnalyzeOutputData &) signal

Introduce AnalyzerOutputData structure that is passed inside
new done() signal. This signal replaces the finishedWithSuccess()
and finishedWithFailure() signals. The output structure contains
all the data required in clients' handlers.

Move AnalyzeUnit into clangtoolrunner.h in order to avoid
circular dependencies.

Get rid of outputFilePath(), as it's passed inside AnalyzeOutputData
now.

Inline ClangToolRunWorker::unitsToAnalyze() as it's used only once.

Change-Id: Icf9a52853c68e83f6ddfc4858dbcb830b96e1844
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Jarek Kobus
2023-01-11 15:32:46 +01:00
parent c181631de9
commit 5dec97ea41
7 changed files with 123 additions and 159 deletions

View File

@@ -4,7 +4,6 @@
#pragma once
#include "clangfileinfo.h"
#include "clangtoolruncontrol.h"
#include "clangtoolsdiagnostic.h"
#include "clangtoolsprojectsettings.h"
@@ -22,6 +21,8 @@ namespace ClangTools {
namespace Internal {
class AnalyzeOutputData;
class AnalyzeUnit;
class ClangToolRunner;
class DiagnosticMark;
@@ -40,8 +41,7 @@ private:
void run();
void runNext();
void onSuccess();
void onFailure(const QString &errorMessage, const QString &errorDetails);
void onDone(const AnalyzeOutputData &output);
void finalize();