Added missing window titles to all popups (#2120)

This commit is contained in:
Paweł
2020-10-31 15:12:42 +01:00
committed by GitHub
parent 05469d1bba
commit 3c1abbd297
6 changed files with 13 additions and 3 deletions
+3 -1
View File
@@ -230,9 +230,11 @@ void AboutPage::addLicense(QFormLayout *form, const QString &name,
auto *a = new QLabel("<a href=\"" + website + "\">" + name + "</a>");
a->setOpenExternalLinks(true);
auto *b = new QLabel("<a href=\"" + licenseLink + "\">show license</a>");
QObject::connect(b, &QLabel::linkActivated, [licenseLink] {
QObject::connect(b, &QLabel::linkActivated, [licenseLink, name] {
auto *edit = new QTextEdit;
edit->setWindowTitle(
QString("Chatterino - showing %1's license").arg(name));
QFile file(licenseLink);
file.open(QIODevice::ReadOnly);
edit->setText(file.readAll());