47 static void initialize(
const QString &configFilePath = QString());
84 const QString &sourceFilePath)
const;
116 AppConfig(
const QString &configFilePath);
117 ~AppConfig() =
default;
120 AppConfig(
const AppConfig &) =
delete;
121 AppConfig &operator=(
const AppConfig &) =
delete;
124 static void createDefaultConfigFile(
const QString &path);
127 static QString getDefaultConfigPath();
129 static AppConfig *instance_;
131 QString configFilePath_;
134 bool commentExtractionEnabled_ =
true;
135 bool memoryProfilingEnabled_ =
false;
138 int parallelProcessorCount_ = 0;
141 QString hashPath(
const QString &path)
const;
142 void ensureCacheDirectory(
const QString &compilationDatabasePath)
const;
bool reload()
Reload settings from the config file on disk.
QString getAstCacheDirectory(const QString &compilationDatabasePath) const
Get the AST cache directory for a compilation database.
QString getDependenciesFilePath(const QString &compilationDatabasePath) const
Get the dependencies JSON file path for a compilation database.
QString getCacheDirectory(const QString &compilationDatabasePath) const
Get the cache directory for a compilation database.
QString getMetadataFilePath(const QString &compilationDatabasePath) const
Get the metadata JSON file path for a compilation database.
QString getAstFilePath(const QString &compilationDatabasePath, const QString &sourceFilePath) const
Get the AST cache file path for a source file.
QString getCacheRoot() const
Custom cache root directory (default: ~/.cache/acav/).
QString getBuildDirectory(const QString &compilationDatabasePath) const
Get the build directory from cached metadata.
static AppConfig & instance()
Get the singleton instance.
static void initialize(const QString &configFilePath=QString())
Initialize the singleton with a custom config file path.
bool getCommentExtractionEnabled() const
Whether to extract and display comments in AST (default: false).
bool getMemoryProfilingEnabled() const
Whether memory profiling checkpoints are enabled (default: false).
QString getFontFamily() const
Editor/UI font family (default: empty = system default).
int getParallelProcessorCount() const
Number of parallel processors for query-dependencies (default: 0 = auto) 0 means use all available CP...
QString getConfigFilePath() const
Get the path to the currently loaded configuration file.
int getFontSize() const
Editor/UI font size (default: 11).