From 8de4d9df7cac84416f4b2aac656cd8ae51833c89 Mon Sep 17 00:00:00 2001 From: dustinface Date: Tue, 2 Oct 2018 17:38:55 +0200 Subject: [PATCH] [QT] Fixed copyright text --- src/init.cpp | 2 +- src/qt/splashscreen.cpp | 4 ++-- src/util.cpp | 8 ++++---- src/util.h | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index bbcf6626..66da995c 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -593,7 +593,7 @@ std::string LicenseInfo() const std::string URL_SOURCE_CODE = ""; const std::string URL_WEBSITE = ""; // todo: remove urls from translations on next change - return CopyrightHolders(strprintf(_("Copyright (C) %i-%i"), 2009, COPYRIGHT_YEAR) + " ") + "\n" + + return CopyrightHolders(_("Copyright (C)"), 2017, COPYRIGHT_YEAR) + "\n" + "\n" + strprintf(_("Please contribute if you find %s useful. " "Visit %s for further information about the software."), diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp index 10e85bac..3970f810 100644 --- a/src/qt/splashscreen.cpp +++ b/src/qt/splashscreen.cpp @@ -30,7 +30,7 @@ SplashScreen::SplashScreen(Qt::WindowFlags f, const NetworkStyle *networkStyle) QWidget(0, f), curAlignment(0) { // set reference point, paddings - int paddingRight = 50; + int paddingRight = 70; int paddingTop = 50; int titleVersionVSpace = 17; int titleCopyrightVSpace = 40; @@ -44,7 +44,7 @@ SplashScreen::SplashScreen(Qt::WindowFlags f, const NetworkStyle *networkStyle) // define text to place QString titleText = tr(PACKAGE_NAME); QString versionText = QString("Version %1").arg(QString::fromStdString(FormatFullVersion())); - QString copyrightText = QString::fromUtf8(CopyrightHolders(strprintf("\xc2\xA9 %u-%u ", 2017, COPYRIGHT_YEAR)).c_str()); + QString copyrightText = QString::fromUtf8(CopyrightHolders("\xc2\xA9", 2017, COPYRIGHT_YEAR).c_str()); QString titleAddText = networkStyle->getTitleAddText(); QString font = QApplication::font().toString(); diff --git a/src/util.cpp b/src/util.cpp index dd47d03d..610fb021 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -878,13 +878,13 @@ int GetNumCores() #endif } -std::string CopyrightHolders(const std::string& strPrefix) +std::string CopyrightHolders(const std::string& strPrefix, unsigned int nStartYear, unsigned int nEndYear) { - std::string strCopyrightHolders = strPrefix + strprintf(_(COPYRIGHT_HOLDERS), _(COPYRIGHT_HOLDERS_SUBSTITUTION)); + std::string strCopyrightHolders = strPrefix + strprintf(" %u-%u ", nStartYear, nEndYear) + strprintf(_(COPYRIGHT_HOLDERS), _(COPYRIGHT_HOLDERS_SUBSTITUTION)); // Check for untranslated substitution to make sure Bitcoin Core copyright is not removed by accident - if (strprintf(COPYRIGHT_HOLDERS, COPYRIGHT_HOLDERS_SUBSTITUTION).find("SmartCash") == std::string::npos) { - strCopyrightHolders += "\n" + strPrefix + "The SmartCash developers"; + if (strprintf(COPYRIGHT_HOLDERS, COPYRIGHT_HOLDERS_SUBSTITUTION).find("Bitcoin Core") == std::string::npos) { + strCopyrightHolders += "\n" + strPrefix + strprintf(" %u-%u ", 2009, nEndYear) + "The Bitcoin Core developers"; } return strCopyrightHolders; } diff --git a/src/util.h b/src/util.h index 9bd5669d..a6323165 100644 --- a/src/util.h +++ b/src/util.h @@ -267,7 +267,7 @@ template void TraceThread(const char* name, Callable func) } } -std::string CopyrightHolders(const std::string& strPrefix); +std::string CopyrightHolders(const std::string& strPrefix, unsigned int nStartYear, unsigned int nEndYear); /** * @brief Converts version strings to 4-byte unsigned integer