diff options
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(); |