From 4e3c479a0f279926e0bd9a359a0ee57b334e976e Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Fri, 8 Dec 2017 14:22:19 +0100 Subject: Replaced tinytoml with libconfig --- src/forms/aboutdialog.cpp | 64 ++++++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 28 deletions(-) (limited to 'src/forms/aboutdialog.cpp') 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("

smolbote %1

" - "

yet another Qute browser

" - "

Copyright (C) 2017 Xian Nox

" - "

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.

") + "

yet another Qute browser

") .arg(qApp->applicationVersion())); ui->toolBox->addItem(aboutLabel, tr("About")); - QLabel *detailsLabel = new QLabel(this); - detailsLabel->setWordWrap(true); - detailsLabel->setText(tr("

Version %1

" - "

" - "Based on Qt " QT_VERSION_STR "
" -#if defined __clang__ - "Compiled with Clang " __clang_version__ "
" -#elif defined __GNUC__ - "Compiled with GCC " __VERSION__ "
" -#endif - "Configuration lives in %2
" - "Default configuration lives in %3" - "

") - .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("

Copyright (C) 2017 Xian Nox

" + "

This program is free software, and you are welcome to use it under the conditions set by the GNU GPLv3:" + "

" + "

You can find the full license text in LICENSE.md.

")); + ui->toolBox->addItem(licenseLabel, tr("License")); QLabel *libsLabel = new QLabel(this); libsLabel->setWordWrap(true); - libsLabel->setText(tr("") - .arg(qVersion())); - ui->toolBox->addItem(libsLabel, tr("Libraries")); + libsLabel->setText(tr("

Version %1

" + "

" + "Based on Qt " QT_VERSION_STR "
" + "Compiled with %2" + "

" + "

") + .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"; + } +} -- cgit v1.2.1