Skip to content

Commit

Permalink
Pull copyright year for About Gridcoin from gridcoin-config.h
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescowens committed Feb 19, 2024
1 parent 7587db3 commit a59051a
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/qt/aboutdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<int, QString> copyright_year = COPYRIGHT_YEAR;

try {
copyrightText += QString::number(std::get<int>(copyright_year));
} catch (const std::bad_variant_access& e) {
try {
copyrightText += std::get<QString>(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()));

Expand Down

0 comments on commit a59051a

Please sign in to comment.