diff options
author | Andreas Kling <kling@serenityos.org> | 2022-07-07 02:55:21 +0200 |
---|---|---|
committer | Andrew Kaster <andrewdkaster@gmail.com> | 2022-12-25 07:58:58 -0700 |
commit | 303fda074a6c4a8308f47c84d8eb4d06fb39a56d (patch) | |
tree | cc2fba0e5108ee51e1bf15a7b7a209ca12f0fdd4 /Ladybird/BrowserWindow.cpp | |
parent | 7681ef25da7118465927de3d8d8ba055264e5196 (diff) | |
download | serenity-303fda074a6c4a8308f47c84d8eb4d06fb39a56d.zip |
Ladybird: Fix build with Qt 6.2.4
Diffstat (limited to 'Ladybird/BrowserWindow.cpp')
-rw-r--r-- | Ladybird/BrowserWindow.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Ladybird/BrowserWindow.cpp b/Ladybird/BrowserWindow.cpp index 18014317a3..00f52c6e54 100644 --- a/Ladybird/BrowserWindow.cpp +++ b/Ladybird/BrowserWindow.cpp @@ -19,9 +19,15 @@ BrowserWindow::BrowserWindow(Core::EventLoop& event_loop) m_tabs_container->setMovable(true); m_tabs_container->setTabsClosable(true); - auto menu = menuBar()->addMenu("File"); - auto new_tab_action = menu->addAction("New Tab", QKeySequence(Qt::CTRL | Qt::Key_T)); - auto quit_action = menu->addAction("Quit", QKeySequence(Qt::CTRL | Qt::Key_Q)); + auto* menu = menuBar()->addMenu("File"); + + auto* new_tab_action = new QAction("New Tab"); + new_tab_action->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_T)); + menu->addAction(new_tab_action); + + auto* quit_action = new QAction("Quit"); + quit_action->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_Q)); + menu->addAction(quit_action); QObject::connect(new_tab_action, &QAction::triggered, this, &BrowserWindow::new_tab); QObject::connect(quit_action, &QAction::triggered, this, &QMainWindow::close); |