From 94886cfaccff969d3c1d720d2a913ab95f92bc55 Mon Sep 17 00:00:00 2001 From: complexlogic Date: Sat, 26 Oct 2024 07:31:38 -0700 Subject: [PATCH] Add information to about page --- .github/workflows/build.yml | 2 +- src/about.cpp | 33 ++++++++++++++++++++++++++++++++- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 62f8af7..c3d6e61 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,7 +30,7 @@ permissions: statuses: read env: - VCPKG_COMMITTISH: 1de2026f28ead93ff1773e6e680387643e914ea1 + VCPKG_COMMITTISH: 10b7a178346f3f0abef60cecd5130e295afd8da4 jobs: build_windows: diff --git a/src/about.cpp b/src/about.cpp index 77691d2..fcc8435 100644 --- a/src/about.cpp +++ b/src/about.cpp @@ -11,6 +11,11 @@ extern "C" { #include } +#include +#if TAGLIB_MAJOR_VERSION > 1 +#include +#endif + #include "ui_about.h" #include "config.hpp" #include "about.hpp" @@ -51,6 +56,22 @@ ui(std::make_unique()) ffmpeg_version(swresample_version, ui->lswr_ver); ffmpeg_version(avutil_version, ui->lavu_ver); +#if TAGLIB_MAJOR_VERSION > 1 + { + const auto tversion = TagLib::runtimeVersion(); + ui->formLayout->addRow( + new QLabel("TagLib:", this), + new QLabel( + QString("%1.%2%3") + .arg(tversion.majorVersion()) + .arg(tversion.minorVersion()) + .arg(tversion.patchVersion() ? QString(".%1").arg(tversion.patchVersion()) : ""), + this + ) + ); + } +#endif + // Encoders #define SUPPORT_FEATURE(feature, label) ui->label->setText(feature ? tr("Yes") : tr( "No")) SUPPORT_FEATURE(config.has_feature.lame, support_lame); @@ -63,7 +84,17 @@ ui(std::make_unique()) // Build info ui->build_date->setText(BUILD_DATE); #if defined(__GNUC__) && !defined(__clang__) - ui->compiler->setText(QString("GCC %1.%2").arg(__GNUC__).arg(__GNUC_MINOR__)); + ui->compiler->setText(QString("GCC %1.%2" +#if __GNUC_PATCHLEVEL__ > 0 + ".%3" +#endif + ) + .arg(__GNUC__) + .arg(__GNUC_MINOR__) +#if __GNUC_PATCHLEVEL__ > 0 + .arg(__GNUC_PATCHLEVEL__) +#endif + ); #endif #if defined(__clang__)