aboutsummaryrefslogtreecommitdiff
path: root/lib/about/aboutdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/about/aboutdialog.cpp')
-rw-r--r--lib/about/aboutdialog.cpp28
1 files changed, 22 insertions, 6 deletions
diff --git a/lib/about/aboutdialog.cpp b/lib/about/aboutdialog.cpp
index 6b4ebb8..e716217 100644
--- a/lib/about/aboutdialog.cpp
+++ b/lib/about/aboutdialog.cpp
@@ -11,6 +11,7 @@
#include <QtWebEngine/QtWebEngineVersion>
#include <boost/version.hpp>
#include "version.h"
+#include <browser.h>
// compiler
// clang also defines __GNUC__, so we need to check for clang first
@@ -24,6 +25,21 @@
#define compiler "unknown compiler"
#endif
+inline QString getPluginList()
+{
+ auto *browser = qobject_cast<Browser*>(qApp);
+ Q_CHECK_PTR(browser);
+
+ QString plugins;
+ for(const Plugin &p : browser->plugins()) {
+ plugins.append(QString("<li>%1 (%2)</li>").arg(p.name, p.author));
+ }
+ if(!plugins.isEmpty())
+ plugins = "Loaded plugins: <ul>" + plugins + "</ul";
+
+ return plugins;
+}
+
AboutDialog::AboutDialog(QWidget *parent)
: QDialog(parent)
, ui(new Ui::AboutDialog)
@@ -36,7 +52,8 @@ AboutDialog::AboutDialog(QWidget *parent)
auto *aboutLabel = new QLabel(this);
aboutLabel->setWordWrap(true);
aboutLabel->setText(tr("<h2>smolbote %1</h2>"
- "<p><i>yet another no-frills browser</i></p>")
+ "<p><i>yet another no-frills browser</i></p>"
+ "<p>This program is free software, and is built upon other free software: Qt " QT_VERSION_STR " and Boost " BOOST_LIB_VERSION "</p>")
.arg(qApp->applicationVersion()));
ui->toolBox->addItem(aboutLabel, tr("About"));
@@ -54,15 +71,14 @@ AboutDialog::AboutDialog(QWidget *parent)
"<p>This program is distributed in the hope that it will be useful, but without any warranty.</p>"));
ui->toolBox->addItem(licenseLabel, tr("License"));
+
+
+
auto *detailsLabel = new QLabel(this);
detailsLabel->setWordWrap(true);
detailsLabel->setText(tr("<p>Build " SMOLBOTE_BRANCH ":" SMOLBOTE_COMMIT "</p>"
"<p>Compiled with " compiler "</p>"
- "<p>Libraries: <ul>"
- "<li>Qt " QT_VERSION_STR "</li>"
- "<li>QtWebEngine " QTWEBENGINE_VERSION_STR "</li>"
- "<li>Boost " BOOST_LIB_VERSION " </li>"
- "</ul></p>"));
+ "<p>%1</p>").arg(getPluginList()));
ui->toolBox->addItem(detailsLabel, tr("Details"));
}