QtCraft API C++ classes QML types Handbook

QcBuildInfo Namespace

What build and machine a log, crash report or login comes from (decision E-834): the project version and the git commit at configure time (CMake writes both into QcBuildInfo.cpp), the compiler, Qt, the operating system and the processor. More...

Header: #include <common/diagnostics/QcBuildInfo.h>

Functions

QString clientText(const QString &program)
QString cpuName()
QString describe(const QString &program)
QString gitCommit()
QStringList headerLines(const QString &program)
QString version()

Detailed Description

Function Documentation

QString QcBuildInfo::clientText(const QString &program)

Returns what a client tells the server at login (QcMsg::Hello::client): program, version, commit, operating system and processor architecture, e.g. "qtcraft 0.1.0 (git 1a2b3c4) Windows 11 x86_64".

QString QcBuildInfo::cpuName()

Returns the name of the processor (e.g. "Apple M2 Pro"); empty where the platform does not report it.

QString QcBuildInfo::describe(const QString &program)

Returns "<program> <version> (git <commit>)" for program.

QString QcBuildInfo::gitCommit()

Returns the short git commit the build was configured at, with "-dirty" for local changes; "unknown" outside a git checkout.

QStringList QcBuildInfo::headerLines(const QString &program)

Returns the first lines of a log of program: build, compiler and Qt, operating system, processor, process id and start.

QString QcBuildInfo::version()

Returns the project version, e.g. "0.1.0".