aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2020-11-20 16:25:20 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2020-11-20 20:52:47 +0200
commit4633d4648a048c16744117ac6d48098e47f6f214 (patch)
tree2e974c656ab8f26924e367a53d176d69f443e46d /src
parentDrop args.hxx dependency (diff)
downloadsmolbote-4633d4648a048c16744117ac6d48098e47f6f214.tar.xz
Fix meson warnings
Update about dialog
Diffstat (limited to 'src')
-rw-r--r--src/about/aboutdialog.cpp1
-rw-r--r--src/applicationmenu.cpp6
-rw-r--r--src/browser.cpp7
-rw-r--r--src/browser.h1
-rw-r--r--src/main.cpp12
5 files changed, 9 insertions, 18 deletions
diff --git a/src/about/aboutdialog.cpp b/src/about/aboutdialog.cpp
index f42d551..059e3bf 100644
--- a/src/about/aboutdialog.cpp
+++ b/src/about/aboutdialog.cpp
@@ -58,7 +58,6 @@ AboutDialog::AboutDialog(QWidget *parent)
"<p>Libraries: <ul>"
"<li><a href='https://www.qt.io/'>Qt5</a> " QT_VERSION_STR "</li>"
"<li>spdlog</li>"
- "<li><a href='https://github.com/Taywee/args'>args.hxx</a></li>"
"<li><a href='https://github.com/itay-grudev/SingleApplication'>SingleApplication</a></li>"
"</ul></p>"));
}
diff --git a/src/applicationmenu.cpp b/src/applicationmenu.cpp
index dc888e7..112e790 100644
--- a/src/applicationmenu.cpp
+++ b/src/applicationmenu.cpp
@@ -7,6 +7,7 @@
*/
#include "applicationmenu.h"
+#include "aboutdialog.h"
#include "browser.h"
#include "configuration.h"
#include "session/savesessiondialog.h"
@@ -39,7 +40,10 @@ ApplicationMenu::ApplicationMenu(Browser *app, QWidget *parent)
bottom_pluginSeparator = addSeparator();
- auto *actionAbout = addAction(tr("About"), app, &Browser::about);
+ auto *actionAbout = addAction(tr("About"), app, []() {
+ auto *dlg = new AboutDialog(qApp->activeWindow());
+ dlg->show();
+ });
conf.shortcut<QAction>(*actionAbout, "shortcuts.window.about");
auto *action_aboutPlugins = addAction(tr("About Plugins"), app, &Browser::aboutPlugins);
diff --git a/src/browser.cpp b/src/browser.cpp
index 894216e..d225cbe 100644
--- a/src/browser.cpp
+++ b/src/browser.cpp
@@ -7,7 +7,6 @@
*/
#include "browser.h"
-#include "aboutdialog.h"
#include "aboutplugin.h"
#include "applicationmenu.h"
#include "bookmarks/bookmarkswidget.h"
@@ -55,12 +54,6 @@ Browser::~Browser()
m_windows.clear();
}
-void Browser::about()
-{
- auto *dlg = new AboutDialog(activeWindow());
- dlg->show();
-}
-
void Browser::aboutPlugins()
{
auto *dlg = new AboutPluginDialog;
diff --git a/src/browser.h b/src/browser.h
index 8e443fe..740eec8 100644
--- a/src/browser.h
+++ b/src/browser.h
@@ -54,7 +54,6 @@ signals:
void pluginAdded(QPluginLoader *);
public slots:
- [[deprecated]] void about();
[[deprecated]] void aboutPlugins();
[[deprecated]] void showWidget(QWidget *widget, MainWindow *where) const;
diff --git a/src/main.cpp b/src/main.cpp
index 88fa657..135d0ee 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -49,16 +49,12 @@ int main(int argc, char **argv)
const auto f = command_line::process<Browser>(app, subcommands, "session");
{
+ // load plugins
Configuration conf;
const auto plugins_path = conf.value<QString>("plugins.path").value();
- // load plugins
- /*for(const QString &path : Util::files(conf.value<QString>("plugins.path").value(), { "*.so", "*.dll" })) {
- if(app.loadPlugin(path)) {
- spdlog::debug("Loaded plugin [{}]", qUtf8Printable(path));
- } else {
- spdlog::warn("Failed loading plugin [{}]", qUtf8Printable(path));
- }
- }*/
+ for(const QString &path : Util::files(plugins_path, { "*.so", "*.dll" })) {
+ app.loadPlugin(path) ? spdlog::debug("Loaded plugin [{}]", qUtf8Printable(path)) : spdlog::warn("Failed loading plugin [{}]", qUtf8Printable(path));
+ }
}
return f(app);