diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2019-01-16 16:52:07 +0100 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2019-01-16 16:52:07 +0100 |
commit | 2a696a57abafb25978aef1af5758fe75b706d1f0 (patch) | |
tree | 9c9b3468398b16711a573e0c8b87ae2ad03100b4 /src/subwindow | |
parent | Rewrite lib/urlfilter (diff) | |
download | smolbote-2a696a57abafb25978aef1af5758fe75b706d1f0.tar.xz |
Rewrite lib/web to lib/webprofile
- libweb was supposed to be a general QtWebEngine wrapper, but only
turned out to do profiles and profile management. The new name should
make this more obvious.
- Renamed ProfileManager to WebProfileManager, and cut out duplicate
code.
- Temporary profiles: temporary profiles are not kept after closing the
browser.
Diffstat (limited to 'src/subwindow')
-rw-r--r-- | src/subwindow/subwindow.cpp | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/subwindow/subwindow.cpp b/src/subwindow/subwindow.cpp index 76eddb3..31b49b9 100644 --- a/src/subwindow/subwindow.cpp +++ b/src/subwindow/subwindow.cpp @@ -20,7 +20,6 @@ #include <QTabBar> #include <QToolButton> #include "configuration.h" -#include "profilemanager.h" #include "webprofile.h" SubWindow::SubWindow(const Configuration *config, QWidget *parent, Qt::WindowFlags flags) @@ -35,32 +34,6 @@ SubWindow::SubWindow(const Configuration *config, QWidget *parent, Qt::WindowFla m_profile = WebProfile::defaultProfile(); - // system menu - { - QMenu *menu = systemMenu(); - auto *firstAction = menu->actions().at(0); - - auto *profileName_action = new QAction(tr("Profile: %1").arg(m_profile->name()), menu); - profileName_action->setEnabled(false); - menu->insertAction(firstAction, profileName_action); - - auto *loadProfile_menu = new QMenu(tr("Load profile"), menu); - menu->insertMenu(firstAction, loadProfile_menu); - - Browser *browser = qobject_cast<Browser *>(qApp); - Q_CHECK_PTR(browser); - - auto *profileManager = dynamic_cast<Browser *>(qApp)->getProfileManager(); - loadProfile_menu->addActions(profileManager->createProfileMenu([this, profileName_action](WebProfile *profile) { - this->setProfile(profile); - profileName_action->setText(tr("Profile: %1").arg(profile->name())); - }, - this) - ->actions()); - - menu->insertSeparator(firstAction); - } - auto *fullScreen_shortcut = new QShortcut(QKeySequence(config->value<QString>("subwindow.shortcuts.fullscreen").value()), this); connect(fullScreen_shortcut, &QShortcut::activated, this, [=]() { auto *w = this->window(); |