Sonde v1.1.0
Embeddable Model Context Protocol server for Qt applications
Loading...
Searching...
No Matches
project.h File Reference

A project's files under .sonde/, and its configuration (design 0028). More...

#include <QtCore/QJsonObject>
#include <QtCore/QString>

Go to the source code of this file.

Classes

struct  Sonde::Cli::Project
 Where a project keeps its files: .sonde/ at its root. More...

Namespaces

namespace  Sonde
 Embeddable Model Context Protocol server for Qt applications.

Functions

Project Sonde::Cli::findProject (const QString &explicitConfig)
 The project of the configuration file explicitConfig (--config), or else the first one here or above.
QJsonObject Sonde::Cli::readJsonObject (const QString &path)
 The JSON object in the file path; fails if it can't be read or isn't one.
QJsonObject Sonde::Cli::mergeConfig (QJsonObject config, const QJsonObject &local)
 config with local over it: the local keys replace the shared ones, except "env", whose variables are added to the shared ones.
QString Sonde::Cli::configError (const QJsonObject &config, const QString &path)
 What is wrong with config, read from path, or an empty string.
QJsonObject Sonde::Cli::loadConfig (const Project &project)
 The project's configuration: config.json with local.json over it.

Variables

constexpr QLatin1StringView Sonde::Cli::kProjectDir { ".sonde" }
 The directory a project keeps its files in, at its root.

Detailed Description

A project's files under .sonde/, and its configuration (design 0028).

Function Documentation

◆ findProject()

Project Sonde::Cli::findProject ( const QString & explicitConfig)

The project of the configuration file explicitConfig (--config), or else the first one here or above.

Fails if there is none.

◆ loadConfig()

QJsonObject Sonde::Cli::loadConfig ( const Project & project)

The project's configuration: config.json with local.json over it.

Fails if either can't be read, or the result isn't a valid configuration.