diff options
Diffstat (limited to 'src/forms/aboutdialog.cpp')
-rw-r--r-- | src/forms/aboutdialog.cpp | 64 |
1 files changed, 36 insertions, 28 deletions
diff --git a/src/forms/aboutdialog.cpp b/src/forms/aboutdialog.cpp index e9c2a93..addf66c 100644 --- a/src/forms/aboutdialog.cpp +++ b/src/forms/aboutdialog.cpp @@ -20,7 +20,6 @@ #include "aboutdialog.h" #include "ui_aboutdialog.h" -#include "browser.h" AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), @@ -34,42 +33,51 @@ AboutDialog::AboutDialog(QWidget *parent) : QLabel *aboutLabel = new QLabel(this); aboutLabel->setWordWrap(true); aboutLabel->setText(tr("<h2>smolbote %1</h2>" - "<p><i>yet another Qute browser</i></p>" - "<p>Copyright (C) 2017 Xian Nox</p>" - "<p>This program comes with ABSOLUTELY NO WARRANTY. " - "This is free software, and you are welcome to redistribute it under the conditions set by the GNU GPLv3.</p>") + "<p><i>yet another Qute browser</i></p>") .arg(qApp->applicationVersion())); ui->toolBox->addItem(aboutLabel, tr("About")); - QLabel *detailsLabel = new QLabel(this); - detailsLabel->setWordWrap(true); - detailsLabel->setText(tr("<h3>Version %1</h3>" - "<p>" - "Based on Qt " QT_VERSION_STR "<br>" -#if defined __clang__ - "Compiled with Clang " __clang_version__ "<br>" -#elif defined __GNUC__ - "Compiled with GCC " __VERSION__ "<br>" -#endif - "Configuration lives in %2<br>" - "Default configuration lives in %3" - "</p>") - .arg(browser->applicationLongVersion(), - browser->settings()->configurationPath(), - browser->settings()->defaultsPath())); - ui->toolBox->addItem(detailsLabel, tr("Details")); + QLabel *licenseLabel = new QLabel(this); + licenseLabel->setWordWrap(true); + licenseLabel->setText(tr("<p>Copyright (C) 2017 Xian Nox</p>" + "<p>This program is free software, and you are welcome to use it under the conditions set by the GNU GPLv3:" + "<ul>" + "<li> the freedom to use the software for any purpose,</li>" + "<li> the freedom to change the software to suit your needs,</li>" + "<li> the freedom to share the software with anyone,</li>" + "<li> the freedom to share the changes you make, and</li>" + "<li> the responsibility to grant the same freedoms when sharing the software.</li>" + "</ul>" + "<p>You can find the full license text in LICENSE.md.</p>")); + ui->toolBox->addItem(licenseLabel, tr("License")); QLabel *libsLabel = new QLabel(this); libsLabel->setWordWrap(true); - libsLabel->setText(tr("<ul>" - "<li>Qt %1</li>" - "<li>tinytoml</li>" - "</ul>") - .arg(qVersion())); - ui->toolBox->addItem(libsLabel, tr("Libraries")); + libsLabel->setText(tr("<h3>Version %1</h3>" + "<p>" + "Based on Qt " QT_VERSION_STR "<br>" + "Compiled with %2" + "</p>" + "<p><ul>" + "<li>Qt %3</li>" + "<li>libconfig</li>" + "</ul></p>") + .arg(qApp->applicationVersion(), getCompiler(), qVersion())); + ui->toolBox->addItem(libsLabel, tr("Details")); } AboutDialog::~AboutDialog() { delete ui; } + +constexpr const char *getCompiler() +{ + if(__clang__) { + return "Clang " __clang_version__; + } else if(__GNUC__) { + return "GCC " __VERSION__; + } else { + return "unknown compiler"; + } +} |