|
ACAV f0ba4b7c9529
Abstract Syntax Tree (AST) visualization tool for C, C++, and Objective-C
|
Runs the query-dependencies tool and parses its output. More...
#include <QueryDependenciesRunner.h>
Signals | |
| void | dependenciesReady (const QJsonObject &dependencies) |
| Emitted when query-dependencies completes successfully. | |
| void | dependenciesReadyWithErrors (const QJsonObject &dependencies, const QStringList &errorMessages) |
| Emitted when query-dependencies completes with some errors. | |
| void | error (const QString &errorMessage) |
| Emitted when an error occurs. | |
| void | progress (const QString &message) |
| Emitted with progress updates (e.g., "Running query-dependencies..."). | |
| void | logMessage (const LogEntry &entry) |
| Emitted when the tool produces log output. | |
Public Member Functions | |
| QueryDependenciesRunner (QObject *parent=nullptr) | |
| void | run (const QString &compilationDatabasePath, const QString &outputFilePath, const QString &queryDependenciesBinary=QString()) |
| Run query-dependencies tool with the specified compilation database. | |
| bool | isRunning () const |
| Check if query is currently running. | |
| void | setClangResourceDir (const QString &dir) |
| Set the Clang resource directory. | |
Runs the query-dependencies tool and parses its output.
This class provides a Qt-based interface to run the query-dependencies command-line tool using QProcess. It executes the tool, waits for completion, and parses the JSON output.
Usage: QueryDependenciesRunner runner; connect(&runner, &QueryDependenciesRunner::dependenciesReady, this, &MyClass::onDependenciesReady); connect(&runner, &QueryDependenciesRunner::error, this, &MyClass::onError); runner.run("/path/to/compile_commands.json");
Definition at line 51 of file QueryDependenciesRunner.h.
|
explicit |
Definition at line 34 of file QueryDependenciesRunner.cpp.
|
override |
Definition at line 46 of file QueryDependenciesRunner.cpp.
|
signal |
Emitted when query-dependencies completes successfully.
| dependencies | Parsed JSON object from query-dependencies output |
|
signal |
Emitted when query-dependencies completes with some errors.
| dependencies | Parsed JSON object (includes error section) |
| errorMessages | List of formatted error messages |
|
signal |
Emitted when an error occurs.
| errorMessage | Description of the error |
Referenced by logMessage(), and run().
| bool acav::QueryDependenciesRunner::isRunning | ( | ) | const |
Check if query is currently running.
Definition at line 88 of file QueryDependenciesRunner.cpp.
References isRunning().
Referenced by isRunning(), and run().
|
signal |
Emitted with progress updates (e.g., "Running query-dependencies...").
| message | Progress message |
Referenced by run().
| void acav::QueryDependenciesRunner::run | ( | const QString & | compilationDatabasePath, |
| const QString & | outputFilePath, | ||
| const QString & | queryDependenciesBinary = QString() ) |
Run query-dependencies tool with the specified compilation database.
| compilationDatabasePath | Path to compile_commands.json |
| outputFilePath | Path where dependencies.json should be written |
| queryDependenciesBinary | Path to query-dependencies executable (defaults to "query-dependencies" in PATH) |
Definition at line 53 of file QueryDependenciesRunner.cpp.
References error(), isRunning(), progress(), and run().
Referenced by run().
|
inline |
Set the Clang resource directory.
| dir | Path to clang resource dir (lib/clang/<ver>) |
Definition at line 72 of file QueryDependenciesRunner.h.