diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-12-14 15:27:32 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-12-14 15:45:21 +0200 |
commit | d970b1e28a11223b6dd1cd4a32918cfa9271e283 (patch) | |
tree | f2978d0d0f4f31cc3b6e5d65aec35173ca9eda74 /src/applicationmenu.cpp | |
parent | Update PKGBUILD to build with cmake (diff) | |
download | smolbote-d970b1e28a11223b6dd1cd4a32918cfa9271e283.tar.xz |
Code cleanup
Diffstat (limited to 'src/applicationmenu.cpp')
-rw-r--r-- | src/applicationmenu.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/applicationmenu.cpp b/src/applicationmenu.cpp index f69260d..e6cc538 100644 --- a/src/applicationmenu.cpp +++ b/src/applicationmenu.cpp @@ -8,6 +8,7 @@ #include "applicationmenu.h" #include "about/aboutdialog.h" +#include "about/aboutplugin.h" #include "browser.h" #include "configuration.h" #include "session/savesessiondialog.h" @@ -20,7 +21,7 @@ ApplicationMenu::ApplicationMenu(Browser *app, QWidget *parent) : QMenu(parent) { m_app = app; - setTitle(qApp->applicationName()); + setTitle(QApplication::applicationName()); Configuration conf; const auto sessionPath = conf.value<QString>("session.path").value(); @@ -41,12 +42,18 @@ ApplicationMenu::ApplicationMenu(Browser *app, QWidget *parent) bottom_pluginSeparator = addSeparator(); auto *actionAbout = addAction(tr("About"), app, []() { - auto *dlg = new AboutDialog(qApp->activeWindow()); + auto *dlg = new AboutDialog(QApplication::activeWindow()); dlg->show(); }); conf.shortcut<QAction>(*actionAbout, "shortcuts.window.about"); - auto *action_aboutPlugins = addAction(tr("About Plugins"), app, &Browser::aboutPlugins); + auto *action_aboutPlugins = addAction(tr("About Plugins"), app, [app]() { + auto *dlg = new AboutPluginDialog(QApplication::activeWindow()); + for(auto *info : qAsConst(app->m_plugins)) { + dlg->add(info->loader); + } + dlg->show(); + }); conf.shortcut(*action_aboutPlugins, "app.shortcuts.about.plugins"); auto *actionQuit = addAction(tr("Quit"), app, &Browser::quit); |