From e87693c54ca97ed3a6ed25f9eaae8ab223fc18b1 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Wed, 29 Apr 2020 18:49:07 +0300 Subject: libwebengine Make src/webengine into a static library - Add some tests - Updated manpage - Remove WebProfileManager::id and WebProfileManager::instance - Add consumable semantics checks to WebProfileManager - Add WebProfileManager::walk Add ApplicationMenu class --- src/mainwindow/mainwindow.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/mainwindow/mainwindow.cpp') 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 #include -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(); } -- cgit v1.2.1