aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow/mainwindow.cpp')
-rw-r--r--src/mainwindow/mainwindow.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mainwindow/mainwindow.cpp b/src/mainwindow/mainwindow.cpp
index e16f34f..4ec79b1 100644
--- a/src/mainwindow/mainwindow.cpp
+++ b/src/mainwindow/mainwindow.cpp
@@ -24,7 +24,7 @@
#include <QMessageBox>
#include <QStatusBar>
-MainWindow::MainWindow(const Session::MainWindow &data, QWidget *parent)
+MainWindow::MainWindow(const Session::MainWindow &data, QMenu *appMenu, QWidget *parent)
: QMainWindow(parent)
{
Configuration config;
@@ -50,8 +50,8 @@ MainWindow::MainWindow(const Session::MainWindow &data, QWidget *parent)
this->addToolBarBreak();
this->addToolBar(new BookmarksToolbar(app->bookmarks()->model(), this));
- m_menuBar = new MenuBar(this);
- this->setMenuBar(m_menuBar);
+ m_menuBar = new MenuBar(appMenu, this);
+ setMenuBar(m_menuBar);
// status bar
searchBox = new SearchForm(this);
@@ -125,10 +125,9 @@ void MainWindow::createTab(const Session::WebView &data)
SubWindow *MainWindow::createSubWindow(const Session::SubWindow &data)
{
- const auto *profileManager = WebProfileManager::instance();
- Q_CHECK_PTR(profileManager);
+ WebProfileManager profileManager;
- auto *profile = profileManager->profile(data.profile);
+ auto *profile = profileManager.profile(data.profile);
if(profile == nullptr) {
profile = WebProfile::defaultProfile();
}