Skip to content

Commit

Permalink
[QT] Fixed copyright text
Browse files Browse the repository at this point in the history
  • Loading branch information
xdustinface committed Oct 2, 2018
1 parent a47d81a commit 8de4d9d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ std::string LicenseInfo()
const std::string URL_SOURCE_CODE = "<https://github.com/smartcash/core-smart>";
const std::string URL_WEBSITE = "<https://smartcash.cc>";
// 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."),
Expand Down
4 changes: 2 additions & 2 deletions src/qt/splashscreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
Expand Down
8 changes: 4 additions & 4 deletions src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ template <typename Callable> 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
Expand Down

0 comments on commit 8de4d9d

Please sign in to comment.