Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MU4] Fix #7970: Help > About... Replace link to donate page, change text, say GPL version, say build etc. #7988

Merged
merged 3 commits into from
Apr 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/appshell/iappshellconfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class IAppShellConfiguration : MODULE_EXPORT_INTERFACE
virtual std::string bugReportUrl() const = 0;
virtual std::string leaveFeedbackUrl() const = 0;
virtual std::string museScoreUrl() const = 0;
virtual std::string museScoreForumUrl() const = 0;
virtual std::string museScoreContributionUrl() const = 0;
virtual std::string musicXMLLicenseUrl() const = 0;
virtual std::string musicXMLLicenseDeedUrl() const = 0;
Expand Down
9 changes: 7 additions & 2 deletions src/appshell/internal/appshellconfiguration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static const std::string ONLINE_HANDBOOK_URL("https://musescore.org/redirect/hel
static const std::string ASK_FOR_HELP_URL("https://musescore.org/redirect/post/question?locale=");
static const std::string BUG_REPORT_URL("https://musescore.org/redirect/post/bug-report?locale=");
static const std::string LEAVE_FEEDBACK_URL("https://musescore.com/content/editor-feedback?");
static const std::string MUSESCORE_URL("http://www.musescore.org/");
static const std::string MUSESCORE_URL("https://www.musescore.org/");
Jojo-Schmitz marked this conversation as resolved.
Show resolved Hide resolved
static const std::string MUSICXML_LICENSE_URL("https://www.w3.org/community/about/process/final/");
static const std::string MUSICXML_LICENSE_DEED_URL("https://www.w3.org/community/about/process/fsa-deed/");

Expand Down Expand Up @@ -147,9 +147,14 @@ std::string AppShellConfiguration::museScoreUrl() const
return MUSESCORE_URL + languageCode;
}

std::string AppShellConfiguration::museScoreForumUrl() const
{
return MUSESCORE_URL + "forum";
Jojo-Schmitz marked this conversation as resolved.
Show resolved Hide resolved
}

std::string AppShellConfiguration::museScoreContributionUrl() const
{
return museScoreUrl() + "/donate";
return MUSESCORE_URL + "contribute";
Jojo-Schmitz marked this conversation as resolved.
Show resolved Hide resolved
}

std::string AppShellConfiguration::musicXMLLicenseUrl() const
Expand Down
1 change: 1 addition & 0 deletions src/appshell/internal/appshellconfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class AppShellConfiguration : public IAppShellConfiguration
std::string bugReportUrl() const override;
std::string leaveFeedbackUrl() const override;
std::string museScoreUrl() const override;
std::string museScoreForumUrl() const override;
std::string museScoreContributionUrl() const override;
std::string musicXMLLicenseUrl() const override;
std::string musicXMLLicenseDeedUrl() const override;
Expand Down
20 changes: 13 additions & 7 deletions src/appshell/qml/AboutDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -97,23 +97,29 @@ QmlDialog {
StyledTextLabel {
Layout.fillWidth: true
text: {
var message = qsTrc("appshell", "Visit <a href='%1'>%2</a> for new versions and more information.<br>Support MuseScore with your <a href='%3'>%4</a>.")
var message = qsTrc("appshell", "Visit %1 for new versions and more information.\nGet %2 with the program or %3 to its development.")
var museScoreUrl = aboutModel.museScoreUrl()
var museScoreForumUrl = aboutModel.museScoreForumUrl()
var museScoreContributionUrl = aboutModel.museScoreContributionUrl()
return message
.arg(museScoreUrl.url)
.arg(museScoreUrl.displayName)
.arg(museScoreContributionUrl.url)
.arg(museScoreContributionUrl.displayName)
.arg("<a href='" + museScoreUrl.url + "'>" + museScoreUrl.displayName + "</a>")
.arg("<a href='" + museScoreForumUrl.url + "'>" + museScoreForumUrl.displayName + "</a>")
.arg("<a href='" + museScoreContributionUrl.url + "'>" + museScoreContributionUrl.displayName + "</a>")
.replace("\n", "<br>")
}
wrapMode: Text.WordWrap
maximumLineCount: 3
}

StyledTextLabel {
Layout.fillWidth: true
text: qsTrc("appshell", "Copyright © 1999-2021 MuseScore BVBA and others.\nPublished under the GNU General Public License.")
enabled: false
Jojo-Schmitz marked this conversation as resolved.
Show resolved Hide resolved
text: {
var message = qsTrc("appshell", "Copyright © 1999-2021 MuseScore BVBA and others.\nPublished under the %1GNU General Public License version 3%2.")
return message
.arg("<a href='https://www.gnu.org/licenses/gpl-3.0.html'>")
.arg("</a>")
.replace("\n", "<br>")
}
wrapMode: Text.WordWrap
maximumLineCount: 3
}
Expand Down
19 changes: 16 additions & 3 deletions src/appshell/view/aboutmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include "aboutmodel.h"

#include "translation.h"
#include "version.h"
#include "config.h"

#include <QClipboard>
#include <QUrl>
Expand All @@ -36,7 +38,9 @@ AboutModel::AboutModel(QObject* parent)

QString AboutModel::museScoreVersion() const
{
return QString::fromStdString(configuration()->museScoreVersion());
return (mu::framework::Version::unstable() ? qtrc("appshell",
"Unstable Prerelease for %1") : "%1").arg(QString::fromStdString(configuration()->
museScoreVersion()));
}

QString AboutModel::museScoreRevision() const
Expand All @@ -50,10 +54,16 @@ QVariantMap AboutModel::museScoreUrl() const
return makeUrl(museScoreUrl.toString(), museScoreUrl.host());
}

QVariantMap AboutModel::museScoreForumUrl() const
{
QUrl museScoreUrl(QString::fromStdString(configuration()->museScoreForumUrl()));
return makeUrl(museScoreUrl.toString(), qtrc("appshell", "help"));
}

QVariantMap AboutModel::museScoreContributionUrl() const
{
QUrl museScoreUrl(QString::fromStdString(configuration()->museScoreContributionUrl()));
return makeUrl(museScoreUrl.toString(), qtrc("appshell", "contribution"));
return makeUrl(museScoreUrl.toString(), qtrc("appshell", "contribute"));
}

QVariantMap AboutModel::musicXMLLicenseUrl() const
Expand All @@ -70,7 +80,10 @@ QVariantMap AboutModel::musicXMLLicenseDeedUrl() const

void AboutModel::copyRevisionToClipboard() const
{
QApplication::clipboard()->setText(museScoreRevision());
QApplication::clipboard()->setText(QString(
"OS: %1, Arch.: %2, MuseScore version (%3-bit): %4-%5, revision: github-musescore-musescore-%6")
.arg(QSysInfo::prettyProductName()).arg(QSysInfo::currentCpuArchitecture()).arg(QSysInfo::WordSize)
.arg(VERSION).arg(BUILD_NUMBER).arg(MUSESCORE_REVISION));
}

QVariantMap AboutModel::makeUrl(const QString& url, const QString& displayName) const
Expand Down
1 change: 1 addition & 0 deletions src/appshell/view/aboutmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class AboutModel : public QObject
Q_INVOKABLE QString museScoreVersion() const;
Q_INVOKABLE QString museScoreRevision() const;
Q_INVOKABLE QVariantMap museScoreUrl() const;
Q_INVOKABLE QVariantMap museScoreForumUrl() const;
Q_INVOKABLE QVariantMap museScoreContributionUrl() const;

Q_INVOKABLE QVariantMap musicXMLLicenseUrl() const;
Expand Down