diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-04-29 18:49:07 +0300 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-05-08 13:40:29 +0300 |
commit | e87693c54ca97ed3a6ed25f9eaae8ab223fc18b1 (patch) | |
tree | 54194ca979ac7e646ff3f10ed6d7f7753273f0be /src/mainwindow/mainwindow.cpp | |
parent | Expand pluginloader test coverage (diff) | |
download | smolbote-e87693c54ca97ed3a6ed25f9eaae8ab223fc18b1.tar.xz |
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
Diffstat (limited to 'src/mainwindow/mainwindow.cpp')
-rw-r--r-- | src/mainwindow/mainwindow.cpp | 11 |
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(); } |