From a59051a5679386aabc73821dd81cde525d3faaa5 Mon Sep 17 00:00:00 2001 From: "James C. Owens" Date: Sun, 18 Feb 2024 21:20:32 -0500 Subject: [PATCH] Pull copyright year for About Gridcoin from gridcoin-config.h --- src/qt/aboutdialog.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/qt/aboutdialog.cpp b/src/qt/aboutdialog.cpp index 35f2df5b44..0f18d289d4 100755 --- a/src/qt/aboutdialog.cpp +++ b/src/qt/aboutdialog.cpp @@ -10,7 +10,23 @@ AboutDialog::AboutDialog(QWidget *parent) : ui(new Ui::AboutDialog) { ui->setupUi(this); - ui->copyrightLabel->setText("Copyright 2009-2024 The Bitcoin/Peercoin/Black-Coin/Gridcoin developers"); + + QString copyrightText = "Copyright 2009-"; + std::variant copyright_year = COPYRIGHT_YEAR; + + try { + copyrightText += QString::number(std::get(copyright_year)); + } catch (const std::bad_variant_access& e) { + try { + copyrightText += std::get(copyright_year); + } catch (const std::bad_variant_access& e) { + copyrightText += "Present"; + } + } + + copyrightText += " The Bitcoin/Peercoin/Black-Coin/Gridcoin developers"; + + ui->copyrightLabel->setText(copyrightText); resize(GRC::ScaleSize(this, width(), height()));