MCPcopy Create free account
hub / github.com/MultiMC/Launcher / AboutDialog

Method AboutDialog

launcher/ui/dialogs/AboutDialog.cpp:75–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AboutDialog)
76{
77 ui->setupUi(this);
78
79 QString launcherName = BuildConfig.LAUNCHER_NAME;
80
81 setWindowTitle(tr("About %1").arg(launcherName));
82
83 QString chtml = getCreditsHtml(QStringList());
84 ui->creditsText->setHtml(chtml);
85
86 QString lhtml = getLicenseHtml();
87 ui->licenseText->setHtml(lhtml);
88
89 ui->urlLabel->setOpenExternalLinks(true);
90
91 ui->icon->setPixmap(APPLICATION->getThemedIcon("logo").pixmap(64));
92 ui->title->setText(launcherName);
93
94 ui->versionLabel->setText(tr("Version") +": " + BuildConfig.printableVersionString());
95 ui->platformLabel->setText(tr("Platform") +": " + BuildConfig.BUILD_PLATFORM);
96
97 if (BuildConfig.VERSION_BUILD >= 0)
98 ui->buildNumLabel->setText(tr("Build Number") +": " + QString::number(BuildConfig.VERSION_BUILD));
99 else
100 ui->buildNumLabel->setVisible(false);
101
102 if (!BuildConfig.VERSION_CHANNEL.isEmpty())
103 ui->channelLabel->setText(tr("Channel") +": " + BuildConfig.VERSION_CHANNEL);
104 else
105 ui->channelLabel->setVisible(false);
106
107 ui->redistributionText->setHtml(tr(
108"<p>We keep MultiMC open source because we think it's important to be able to see the source code for a project like this, and we do so using the Apache license.</p>\n"
109"<p>Part of the reason for using the Apache license is we don't want people using the &quot;MultiMC&quot; name when redistributing the project. "
110"This means people must take the time to go through the source code and remove all references to &quot;MultiMC&quot;, including but not limited to the project "
111"icon and the title of windows, (no <b>MultiMC-fork</b> in the title).</p>\n"
112"<p>The Apache license covers reasonable use for the name - a mention of the project's origins in the About dialog and the license is acceptable. "
113"However, it should be abundantly clear that the project is a fork <b>without</b> implying that you have our blessing.</p>"
114 ));
115
116 QString urlText("<html><head/><body><p><a href=\"%1\">%1</a></p></body></html>");
117 ui->urlLabel->setText(urlText.arg(BuildConfig.LAUNCHER_GIT));
118
119 QString copyText("© 2012-2021 %1");
120 ui->copyLabel->setText(copyText.arg(BuildConfig.LAUNCHER_COPYRIGHT));
121
122 connect(ui->closeButton, SIGNAL(clicked()), SLOT(close()));
123
124 connect(ui->aboutQt, &QPushButton::clicked, &QApplication::aboutQt);
125
126 loadPatronList();
127}
128
129AboutDialog::~AboutDialog()
130{

Callers

nothing calls this directly

Calls 8

getCreditsHtmlFunction · 0.85
getLicenseHtmlFunction · 0.85
pixmapMethod · 0.80
getThemedIconMethod · 0.80
setVisibleMethod · 0.80
isEmptyMethod · 0.80
setupUiMethod · 0.45
setTextMethod · 0.45

Tested by

no test coverage detected